I’m trying to create a typewriter effect.
my code works fine. My problem, and this … UITextView fails to update in real time. this is my code:
NSMutableArray *testochar=[util getTestoChar:value];
for (int i=0; i<[testochar count]; i++){
NSString *y=[testochar objectAtIndex:i];
[NSThread sleepForTimeInterval:0.1f];
self.txtview.text=[self.txtview.text stringByAppendingString:y];
}
All modification on UI you should do in main thread, try use
performSelectorOnMainThread:withObject:waitUntilDone:call
(update)
try
it works like:
http://www.youtube.com/watch?v=tB2YKX4zpY4