-1
我会写一些代码来询问用户在xcode 5上为ios7.1启用推送通知,这里是我的代码。单击确定或不允许后,xcode推送通知
- (IBAction)funcTabToAllow:(id)sender
{
[self PushAllow];
}
- (BOOL)PushAllow
{
[[UIApplication sharedApplication] registerForRemoteNotificationTypes:
(UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound | UIRemoteNotificationTypeAlert)];
return YES;
}
和任何工作正常,现在当用户点击我的按钮,一个警告框显示用于向用户询问是否OK或不要让,这里是形象。
现在怎么知道,如果用户触摸OK或不允许?我想如果用户点击确定我会写一些日志。
感谢您的帮助。
你看过'registerForRemoteNotificationTypes:'的文档吗? –
@JesseRusak我会坚果我不知道如何自定义'UIRemoteNotificationTypeAlert' – vietnguyen09