0
votes

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 working 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,

1
Cant help you if you dont give more information. Also if your app is crashing, its probably NOT working well.Altealice
problem occurs only when before completing rendering of one page if we again swipes.which information can i provide,do you need drawLayer.ajay
possible duplicate of problem when swipe using very fastoutis
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];ajay

1 Answers

0
votes

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];