I am moving my code from a regular GCD to NSOperationQueue because I need some functions. Most of my code relies on dispatch_after to work properly. Is there a way to do something similar with NSOperation ?
This is part of my code that needs to be converted to NSOperation . If you could give an example of converting it using this code, that would be great.
dispatch_queue_t queue = dispatch_queue_create("com.cue.MainFade", NULL); dispatch_time_t mainPopTime = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(timeRun * NSEC_PER_SEC)); dispatch_after(mainPopTime, queue, ^(void){ if(dFade !=nil){ double incriment = ([dFade volume] / [self fadeOut])/10;
ios objective-c xcode grand-central-dispatch nsoperationqueue
sinΞΈ Mar 18 '13 at 15:31 2013-03-18 15:31
source share