I am working on pdf reader app.i am using gestures for rendering next page from the current page,for this i am using swipe. 1.My work is working well. 2. For each time i am calling drawLayer using setNeedsDisplay. 3.My app is wor开发者_开发技巧king fine if the swipe is slow means while page rendering is in process if i swipe then it is getting crashing.
can any one help me to solve this issue with some library files. Thank you all,
this is the answer for the above question [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(loadPagesAccordingToCurrentOrientation) object:nil]; [self performSelector:@selector(loadPagesAccordingToCurrentOrientation) withObject:nil afterDelay:0.5];
精彩评论