2011-06-25 9 views
0

私のiPhoneでは、forループでは連続した繰り返しの間にいくらかの遅延があることを保証したいと思います。forループで連続した繰り返しの実行に遅延を追加する方法はありますか?

どうすればいいですか?

+1

可能複製をtheString objective-c](http://stackoverflow.com/questions/829449/thread-sleep-in-objective-c) – ChrisF

+1

ちょうど好奇心から外れます。なぜあなたはそれをしたいのですか? – uvesten

+0

申し訳ありません私はChrisFが正しいと思います。 –

答えて

0

forloopstart {

[self performSelector:@selector(updateTextLabelWithString:) withObject:@"sleep 5 worked" afterDelay:5.0]; 

}

- (ボイド)updateTextLabelWithString:(NSStringの*)でのThread.sleep〔の {

NSLog(@"theString is : %@ \n\n",theString); 

}

関連する問題