I am trying to server side connection on a background thread us开发者_C百科ing NSOperation. I didn't want to subclass NSOperation ..So how can use NSOperation and how to return response from NSOperation...
Any Ideas about this?
since NSOperation is an abstract class there is no way to use NSOperation without using a subclass of NSOperation.
If you don't want to subclass yourself you can use one of the NSOperation subclasses (ie NSInvocationOperation, or NSBlockOperation).
Here is a good example where to start: Cocoa Tutorial: NSOperation and NSOperationQueue
精彩评论