私のAppDelegate
中で私は定義しました
AppDelegate.h
@property (strong, nonatomic) NSTimer *notificationTimer;
AppDelegate.m
@synthesize notificationTimer = _notificationTimer;
- (void)applicationDidBecomeActive:(UIApplication *)application {
NSLog(@"applicationDidBecomeActive");
self.notificationTimer = [NSTimer timerWithTimeInterval:5
target:self
selector:@selector(checkForNotifications:)
userInfo:nil
repeats:YES];
[self.notificationTimer fire];
}
checkForNotifications:
に一度到達しますが、繰り返されることはありません。なんで?