我只是徘徊如果有一個簡單的方法重複20秒以下的代碼。如果有,如何?重複自我performSelector
[self performSelector:@selector(move1) withObject:nil afterDelay:0.0];
[self performSelector:@selector(move2) withObject:nil afterDelay:0.2];
[self performSelector:@selector(move3) withObject:nil afterDelay:0.4];
[self performSelector:@selector(move1) withObject:nil afterDelay:0.8];
[self performSelector:@selector(move2) withObject:nil afterDelay:0.10];
[self performSelector:@selector(move3) withObject:nil afterDelay:0.12];
20次? hmmmm。那20秒怎麼樣? – Bazinga 2012-07-10 08:33:28
請參閱每1秒調用一次的testMethod,以便它將該intTmp遞增20次,並且當intTmp大於20時,它將進入其他條件並且定時器失效。 – 2012-07-10 09:18:14
謝謝你 – Bazinga 2012-07-12 08:30:36