Ios 使用解析推送时将应用内alertview通知与横幅视图交换
我想知道是否有一种方法可以将用户在应用程序中发出通知时发出的Ios 使用解析推送时将应用内alertview通知与横幅视图交换,ios,parse-platform,apple-push-notifications,Ios,Parse Platform,Apple Push Notifications,我想知道是否有一种方法可以将用户在应用程序中发出通知时发出的alertview样式通知替换为banner通知样式(如果另一个应用程序在接收推送时处于活动状态,则会得到该样式的通知) 我正在使用解析推送通知配置,如下所示,但我不确定在哪里可以进行这些更改(或者如果可能的话)-感谢您的帮助 //In didFinishLaunchingWithOptions [application registerForRemoteNotificationTypes: UIRemoteNotificationTy
alertview
样式通知替换为banner
通知样式(如果另一个应用程序在接收推送时处于活动状态,则会得到该样式的通知)
我正在使用解析推送通知配置,如下所示,但我不确定在哪里可以进行这些更改(或者如果可能的话)-感谢您的帮助
//In didFinishLaunchingWithOptions
[application registerForRemoteNotificationTypes: UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeSound];
//In appDelegate.m
- (void)application:(UIApplication *)application didRegisterForRemoteNotificationsWithDeviceToken:(NSData *)newDeviceToken {
// Store the deviceToken in the current installation and save it to Parse.
PFInstallation *currentInstallation = [PFInstallation currentInstallation];
[currentInstallation setDeviceTokenFromData:newDeviceToken];
[currentInstallation saveInBackground];
}
- (void)application:(UIApplication *)application didReceiveRemoteNotification:(NSDictionary *)userInfo {
[PFPush handlePush:userInfo];
}
你不能。您需要创建和配置您自己的视图并显示它(当您想要打开和关闭屏幕时,显式地将其作为子视图添加和删除)。这意味着不要调用
handlePush:
,而是运行自己的代码来显示自己的视图。我认为您无法更改它。您需要自己完成并显示您自己的视图…谢谢@Wain,当您说“显示我自己的视图”时,您的意思是如果有办法删除基于警报视图的推送通知(在应用程序中),那么它只是锁定屏幕上显示的横幅、徽章和通知吗?