menuBarOwningApplication
メニューバーのオーナーアプリケーション
@property(readonly, strong) NSRunningApplication *menuBarOwningApplicationvar menuBarOwningApplication: NSRunningApplication? { get }
解説
メニューバーのオーナーアプリケーション
設定値
@property(readonly, strong) NSRunningApplication *menuBarOwningApplicationvar menuBarOwningApplication: NSRunningApplication? { get }
フレームワーク
ApplicationKit
クラス
NSWorkspace
使用可能
10.0
更新時のバージョン
OS X 10.10
参照
関連記事(外部サイト)
例文
//NSWorkspace menuBarOwningApplication func timer029(timer:NSTimer!) { let theWorkspace : NSWorkspace = NSWorkspace.sharedWorkspace() NSLog("%@",(theWorkspace.menuBarOwningApplication?.description)!) } @IBAction func function029(sender: AnyObject) { let anApplication = NSApplication.sharedApplication() //アプリケーションを隠す anApplication.hide(self) //タイマー作成 var timer = NSTimer.scheduledTimerWithTimeInterval(1.0, target: self, selector: Selector("timer029:"), userInfo: nil, repeats: true ) }