In my viewDidLoad
method I have the following:
- (void)viewDidLoad
{
[super viewDidLoad];
[self repeatRequest];
[NSTimer scheduledTimerWithTimeInterval:30.0 target: self selector: @selector(repeatRequest) userInfo: nil repeats: YES];
[NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(onTimer) userInfo:nil repeats:YES];
}
And here are the methods that get called:
- (void) repeatRequest{
NSLog(@"backgroundRequest");
}
- (void) onTimer{
NSLog(@"flip pages");
}
The thing is the everything works well for a 2 minutes and the methods get called as setted...but after that everything goes astray and onTimer
method gets called every second an not one time at five seconds.And also the repeatrequest
is called more often that it should be.Anyone knows which may be the cause?