hi friends, I m creating a Tic tac toe game, in that after click made by user automatically the cpu will respond. I want the cpu response after 0.50 seconds, the sleep() function takes too many time, i don't want that much time, is there any other way to do so???
ok buddy... perfect, thanks...
iPhone Fun
2010-04-12 10:23:40
Thanks buddy m this is what i was needed.....
iPhone Fun
2010-04-12 11:02:54
Actually, it probably isn't. If you call this function on the main thread, the UI will lock up for 0.5 seconds. If you want the UI to remain responsive mihirpmehta's answer is better.
JeremyP
2010-04-12 11:58:13
+5
A:
use
[self performSelector:@selector(FunctionName) withObject:nil afterDelay:0.5 ];
mihirpmehta
2010-04-12 10:25:09