limitDateForMode:
次にタイマーが実行される時間を返します
-(NSDate *)limitDateForMode:(NSString *)mode:
解説
次にタイマーが実行される時間を返します。
返り値
( NSDate * )
日付
引数
( NSString * )mode
モード
フレームワーク
Foundation
クラス
NSRunLoop
Instance Methods
使用可能
10.0
参照
例文
#import "MyObject.h" @implementation MyObject NSTimer *timer; - (IBAction)myAction:(id)sender { timer = [NSTimer timerWithTimeInterval:1 target:self selector:@selector(timerControl) userInfo:nil repeats:YES]; [[NSRunLoop currentRunLoop] addTimer:timer forMode:NSEventTrackingRunLoopMode]; NSLog([[[NSRunLoop currentRunLoop] limitDateForMode:NSEventTrackingRunLoopMode] description]); } - (IBAction)fire:(id)sender { } - (IBAction)stop:(id)sender { } -(void)timerControl{ int i; i = [myOutlet intValue]+1; [myOutlet setIntValue:i]; [myOutlet display]; } @end