The task sounds like this: Two seconds after the appearance of the view, a timer starts in the label. After it reaches a certain value, the increment stops - a pause of two seconds. The timer starts in the second label, again reaches some value, the increment stops, pause. Starts the third label. Timer methods are written, the task: to make a sequential call of three methods with pauses between them. I tried

[NSThread sleepForTimeInterval:x]; 

starting with -viewDidAppear but then the time of all pauses is plus and then all methods are started at once. I am writing for iOS 5.x - you can use blocks, etc.

I would be grateful for the answer on the topic!

    1 answer 1

     [self youFirstMetod]; [self performSelector:@selector(yourSecondMethod) withObject:@"yourParameter or nil" afterDelay:2]; [self performSelector:@selector(yourThirdMethod) withObject:@"yourParameter or nil" afterDelay:4]; 

    If you need an interval between runs of these methods

    • Thank you, Alexander! - AlexThumb