UIView setNeedsDisplay with NSThread/NSTimer
Hi!
I have UIView, which shows simple line chart (it's drawing in drawRect method with CGContext methods). I want refresh this chart between 5 seconds while UIView is visible. How can I do this? Could you show me very simple code example?
I'm asking for that, because when I'm using timer with [self setNeedsDisplay] my app cause crash sometimes (and debugger console is empty). I was trying call [self setNeedsDisplay] with [self performSelectorOnMainView....] and [NSThread detachNewThreadSelector..] and [self performSelector.. withObject... afterDelay...].. every time my app is crashing..
Sorry for my poor language.
Regards,
Greg
|