Hi All,
I am trying to move a UIView, which is small. My for loop just moves the UIView down 100 points.
This works except it doesn't move until the loop is finished.
I have tried setting
[self.view setNeedsDisplay] and [myView setNeedsDisplay], I have also put the function inside nstimer and nsthread, like seen below
[NSThread detachNewThreadSelector:@selector(doStuff) toTarget:self withObject:nil];
and
[NSTimer scheduledTimerWithTimeInterval:1/15
target:self selector:@selector(doStuff)
userInfo:nil
repeats:NO] ;
But it just does not "animate".
After each move of the view, I do a sleep(1); but still nothing.
Hope anyone can help me.