enabledRemoteNotificationTypes
有効なリモート通知タイプを取得します
解説
有効なリモート通知タイプを取得します
Objective-C
@property(readonly) NSRemoteNotificationType enabledRemoteNotificationTypes
var enabledRemoteNotificationTypes: NSRemoteNotificationType { get }
引数
なし
フレームワーク
ApplicationKit
クラス
NSApplication
使用可能
10.7
編集時のバージョン
OS X 10.10
例文
//NSApplication enabledRemoteNotificationTypes //リモート通知の管理 @IBAction func function019(sender: AnyObject) { //共有アプリケーションインスタンスを取得 let anApplication = MyApplication.sharedApplication() //リモート通知の取得 var types:NSRemoteNotificationType = anApplication.enabledRemoteNotificationTypes //ifで判定 if (types == NSRemoteNotificationType.None) { NSLog("None") } //switchで分岐 switch types { case NSRemoteNotificationType.None : NSLog("None") case NSRemoteNotificationType.Badge : NSLog("Badge") case NSRemoteNotificationType.Sound : NSLog("Sound") case NSRemoteNotificationType.Alert : NSLog("Alert") default : break } }