registerForRemoteNotificationTypes:
リモート通知タイプをセットします
解説
リモート通知タイプをセットします。
Objective-C
- (void)registerForRemoteNotificationTypes:(NSRemoteNotificationType)types
func registerForRemoteNotificationTypes(_ types: NSRemoteNotificationType)
返り値
なし
引数
Swift
【NSRemoteNotificationType】
NSRemoteNotificationType.None
なし
NSRemoteNotificationType.Badge
バッチ
NSRemoteNotificationType.Sound
サウンド
NSRemoteNotificationType.Alert
アラート
フレームワーク
ApplicationKit
クラス
NSApplication
Instance Methods
使用可能
10.0
編集時のバージョン
10.10
参照
例文
//NSApplication registerForRemoteNotificationTypes // @IBAction func function020(sender: AnyObject) { //共有アプリケーションインスタンスを取得 let anApplication = MyApplication.sharedApplication() //バッジに設定 anApplication.registerForRemoteNotificationTypes(NSRemoteNotificationType.Badge) }