currentRunLoop
現在のスレッドの実行ループオブジェクトを返します
解説
現在のスレッドの実行ループオブジェクト(NSRunLoop)を返します。なければ作って返します。
返り値
( NSRunLoop * )
実行ループ
引数
フレームワーク
Foundation
クラス
NSRunLoop
Class Methods
使用可能
10.0
参照
- currentMode
例文
#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]; } - (IBAction)fire:(id)sender { } - (IBAction)stop:(id)sender { } -(void)timerControl{ int i; i = [myOutlet intValue]+1; [myOutlet setIntValue:i]; [myOutlet display]; } @end