registerForRemoteNotificationTypes:
レシーバーにアップルプッシュサービスを通して指定されたタイプの通知を登録します
-(void)registerForRemoteNotificationTypes:(UIRemoteNotificationType)types
解説
レシーバーにアップルプッシュサービスを通して指定されたタイプの通知を登録します
返り値
( void )
引数
( UIRemoteNotificationType )types
通知タイプ
UIRemoteNotificationTypeNone
UIRemoteNotificationTypeBadge
UIRemoteNotificationTypeSound
UIRemoteNotificationTypeAlert
フレームワーク
UIKit
クラス
UIApplication
Instance Methods
使用可能
iPhone2.0
参照
例文
- (void)applicationDidFinishLaunching:(UIApplication *)application { // Configure and show the window [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; [application registerForRemoteNotificationTypes: UIRemoteNotificationTypeAlert]; NSLog(@"%@",[[application keyWindow] description]); }