NSThread stop / pause
I have created a NSThread instance in my app. After some point I want to pause it. Is there any way how to do that. I tried doing,
if(![myThread isFinis开发者_如何学Pythonhed]) {
myThread = nil;
}
but still i m not able to stop that thread.
[NSThread sleepForTimeInterval:TIME_TO_PAUSE_THREAD];
OR
YOu have to use NSOperation queue for same
Following link may be usefull to you
http://developer.apple.com/library/ios/#samplecode/ThreadedCoreData/Listings/Classes_ParseOperation_h.html#//apple_ref/doc/uid/DTS40010723-Classes_ParseOperation_h-DontLinkElementID_5
精彩评论