I have a question that we might answer together i have a tickertape in my iphone app (Like those stick tickers) and i use a NSThread to keep the memory away from the main thread so it will not slow down the app. Now the thing is it does its job well but when i scroll on a UITableView that i have on the same view i notice that my ticker tape animation stops to work.
ViewController.m (Main view of this object has the ticker tape on it)
-(void)startTicker { [NSThread detachNewThreadSelector:@selector(start) toTarget:ticker withObject:nil]; }
TickerView.c (This handles the tickertape animation)
// Called from the viewcontroller -(void) start { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [self performSelectorOnMainThread:@selector(loop) withObject:nil waitUntilDone:YES]; [pool release]; } -(void)loop { timerHandle = [NSTimer scheduledTimerWithTimeInterval:.01f target:self selector:@selector(render) userInfo:nil repeats:YES]; } -(void) render { // Does a *** load of calculations here and moves the items in the tickertape.. }
My Question: How can i prevent the UITableview or any other view / touch event to block this thread from updating the tickertape animation ?.