modalWindow
アプリケーションのモーダルウインドウを返します
@property(readonly, strong) NSWindow *modalWindow
var modalWindow: NSWindow? { get }
解説
アプリケーションのモーダルウインドウを返します。
モーダルウインドウがなければnilを返します。
引数
なし
フレームワーク
ApplicationKit
クラス
NSApplication
使用可能
10.0
編集時のバージョン
OS X 10.10
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { NSInteger a=[[NSApplication sharedApplication] runModalForWindow:panel]; NSLog(@"modai %d",a); } - (IBAction)panelButton:(id)sender;//ボタンを押す { NSWindow *aWindow = [NSApp modalWindow]; NSLog([aWindow description]); } @end
//NSApplication modalWindow @IBAction func function023(sender: AnyObject) { //共有アプリケーションインスタンスを取得 let anApplication = MyApplication.sharedApplication() // NSLog("%@",anApplication.modalWindow!) }