简体   繁体   中英

NSOperation performance

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 ).

这是一个很好的示例,从这里开始: 可可教程:NSOperation和NSOperationQueue

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM