NSOperation and UIKit problem
Posted
by Infinity
on Stack Overflow
See other posts from Stack Overflow
or by Infinity
Published on 2010-04-15T11:21:38Z
Indexed on
2010/04/15
11:23 UTC
Read the original article
Hit count: 478
Hello guys!
I am doing my download with an object which was inherited from NSOperation. I have read the documentation and when my operation finished I must call the
[self.delegate performSelectorOnMainThread:@selector(operationDidFinish:) withObject:self waitUntilDone:YES];
method. It needs to be called on the main thread, because the UIKit is not thread safe and the documentation says this in these non thread safe frameworks cases. In the delegate method I am drawing a pdf or an image, but because it is drawn on the main thread the User Interface is very laggy until the drawing is finished. Maybe can you suggest me a good way to avoid this problem?
© Stack Overflow or respective owner