How to call setNeedsDisplayInRect using performSelectorOnMainThread? The problem is rect. I do not know how to pass the rect in performSelectorOnMainThread method. This method ask NSObject, but CGRect is not NSObject, it is just structure *.
//[self setNeedsDisplayInRect:rect];
[self performSelectorOnMainThread:@selector(setNeedsDisplay) withObject:0 waitUntilDone:YES];
}
-(void)drawRect:(CGRect)rect {
/// drawing...
}
I need to invoke setNeedsDisplayInRect method in MainThread from not Main Thread. Does anyone know how to do it?????????? Thanks in advance..
Really Thanks.