Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/108.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 使用解析推送时将应用内alertview通知与横幅视图交换_Ios_Parse Platform_Apple Push Notifications - Fatal编程技术网

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,当您说“显示我自己的视图”时,您的意思是如果有办法删除基于警报视图的推送通知(在应用程序中),那么它只是锁定屏幕上显示的横幅、徽章和通知吗?