2014-03-03 23 views
0

所以我做了一個計時器,並且我遇到了兩個不同的陳述,我不知道它們之間的區別。這裏是我的代碼:目標c中的計時器和計劃的計時器之間的區別是什麼?

Mover = [NSTimer scheduledTimerWithTimeInterval:0.1 target:self selector:@selector(MoveDown) userInfo:nil repeats:YES]; 

有什麼之間的區別:

Mover = [NSTimer timerWithTimeInterval:0.1 target:self selector:@selector(MoveDown) userInfo:nil repeats:YES]; 
+1

我建議您閱讀有關[運行循環](https://developer.apple.com/library/ios/documentation/cocoa/Conceptual/Multithreading/RunLoopManagement/RunLoopManagement.html)的Apples文檔以更好地瞭解其差異。 – Merlevede

回答

1

計劃計時器會自動添加到運行循環,不定期的計時器都沒有。 計時器的功能是一樣的。