내 앱이 시작될 때 메소드를 호출 한 다음 5 초마다 동일한 메소드를 호출해야합니다.NSTimer를 즉시 트리거하는 방법은 무엇입니까?
내 코드는 매우 간단하다 :
// Call the method right away
[self updatestuff:nil]
// Set up a timer so the method is called every 5 seconds
timer = [NSTimer scheduledTimerWithTimeInterval: 5
target: self
selector: @selector(updatestuff:)
userInfo: nil
repeats: YES];
가 바로 트리거의 다음 5 초마다 있도록 타이머 옵션이 있습니까?
아주 좋은 구문을! – loretoparisi