I’m trying to wait seconds ..
for (int i = 0; i < 3; i++) {
// something A
...
// wating
[NSTimer scheduledTimerWithTimeInterval:10
target:self
selector:@selector(endTimer:)
userInfo:nil
repeats:YES];
// something B
...
}
- (void)endTimer:(NSTimer *)timer {
NSLog(@"end timer");
[timer invalidate];
}
I wanna ‘A -> waiting -> B’
but don’t wait …
A -> B -> A -> B -> A -> B -> end timer, end timer, end timer
Is there any way?
good day
try this,
Now, create timer in main function from which you want to call the above function.