I am trying to server side connection on a background thread using 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
来源:https://stackoverflow.com/questions/4969168/nsoperation-performance