次のメソッドはviewControllerにあります。
refreshTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(refreshLabels) userInfo:nil repeats:YES];
現在のオブジェクトではなく、セレクターでappDelegate(または別のクラス)内のメソッドを選択することは可能ですか?
お気に入り:
AppDelegate *ad = (AppDelegate *) [[UIApplication sharedApplication] delegate];
refreshTimer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector([ad refreshLabels]) userInfo:nil repeats:YES];
ありがとう!