私は持っている:
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
[self setNeedsStatusBarAppearanceUpdate];
NSTimer* timer = [NSTimer scheduledTimerWithTimeInterval:0.25 target:self selector:@selector(setCurrentTime:) userInfo:nil repeats:YES];
[[NSRunLoop mainRunLoop] addTimer:timer forMode:NSRunLoopCommonModes];
[timer fire];
}
-(void)setCurrentTime{
NSLog(@"TEST");
dispatch_async(dispatch_get_main_queue(), ^{
NSDate *currentDate = [[NSDate alloc] init];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"HH:mm"];
[currentTime setText:[dateFormatter stringFromDate:currentDate]];
});
}
しかし、何も呼び出されません。