runModalForWindow:relativeToWindow:
非推奨
-(int)runModalForWindow:(NSWindow *)aWindow relativeToWindow:(NSWindow *)docWindow
解説
このメソッドは使いません。
代わりに- beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:を使います。(10.9まで)
10.10からは
NSWindow のbeginSheet:completionHandler: を使用します。
返り値
( int )
整数値
引数
( NSWindow * )aWindow
ウインドウ
( NSWindow * )docWindow
ドキュメントウインドウ
フレームワーク
ApplicationKit
クラス
NSApplication
Instance Methods
使用可能
10.0
参照
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { int ret; [NSApp stopModal]; //このメソッドは使いません。 //かわりに- beginSheet:modalForWindow:modalDelegate:didEndSelector:contextInfo:を使います。 ret = [NSApp runModalForWindow:panelWin relativeToWindow:myWindow]; NSLog([NSString stringWithFormat:@"%d",ret]); } @end