runModalForWindow:
モーダルイベントループを立ち上げます
-(NSInteger)runModalForWindow:(NSWindow *)aWindow
解説
モーダルイベントループを立ち上げます。
返り値
( NSInteger )
整数値
引数
( NSWindow * )aWindow
ウインドウ
フレームワーク
ApplicationKit
クラス
NSApplication
Instance Methods
使用可能
10.0
参照
例文
#import "Controller.h" @implementation Controller NSInteger modaiReturnCode; - (IBAction)pushButton:(id)sender { modaiReturnCode=[[NSApplication sharedApplication] runModalForWindow:panel]; NSLog(@"modaiReturnCode %d",modaiReturnCode); } - (IBAction)stopButton:(id)sender { [[sender window] orderOut:self]; [NSApp stopModalWithCode:modaiReturnCode]; } @end