hideOtherApplications:
他の全てのアプリケーションを隠します
- (void)hideOtherApplications:(id)sender
func hideOtherApplications(_ sender: AnyObject?)
解説
他の全てのアプリケーションを隠します。
返り値
なし
フレームワーク
ApplicationKit
クラス
NSApplication
使用可能
10.0
編集時のバージョン
10.10
参照
関連記事(外部リンク)
例文
#import "Controller.h" @implementation Controller - (IBAction)pushButton:(id)sender { [[NSApplication sharedApplication] hideOtherApplications:nil]; } @end
//NSApplication hideOtherApplications/unhideAllApplications @IBAction func function050(sender: AnyObject) { //共有アプリケーションインスタンスを取得 let anApplication = MyApplication.sharedApplication() // anApplication.hideOtherApplications(self ) //タイマー作成 var timer = NSTimer.scheduledTimerWithTimeInterval(2.0, target: self, selector: Selector("unhideAll:"), userInfo: nil, repeats: false) } //タイマーが起動した時の実行メソッド func unhideAll(timer:NSTimer!) { let anApplication = NSApplication.sharedApplication() //アプリケーション終了 anApplication.unhideAllApplications(self ) }