Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在调用NSURLConnection-sendSynchronousRequest在 NSOperation 中,但该方法立即返回。我希望它会阻止操作,直到收到所有数据。这是我的误解吗?
NSURLConnection
sendSynchronousRequest
将 NSURLConnection 对象的委托设置为 self
NSURLConnection *theConnection = [[NSURLConnection alloc] initWithRequest:theRequest delegate:self];
-(void)connectionDidFinishLoading:(NSURLConnection *)connection{ //your code }