我是 iOS 应用程序开发的新手...
我有一个 View 在哪个 push logo Area 上。
我的 View 中还有一个 PushNotificationAlertView
。
现在我的问题是,当我的 PushNotificationAlertView
出现时,我能否像关注 Highlight push logo Area 那样做。
警报来自 UIUserNotificationSettings
在 AppDelegate.m
UIUserNotificationSettings* notificationSettings = [UIUserNotificationSettings settingsForTypes:UIUserNotificationTypeAlert | UIUserNotificationTypeBadge | UIUserNotificationTypeSound categories:nil];
[[UIApplication sharedApplication] registerUserNotificationSettings:notificationSettings];
[[UIApplication sharedApplication] registerForRemoteNotifications];
我收到如下图所示的警报
但是我想要下面的图片请帮助我
我该怎么做? 请帮助我。:)
最佳答案
使用自定义 View 或标签使其突出显示。
使用下面的代码通知您的 View Controller 。
在链接的函数下方添加您的代码段
if ([[notification name] isEqualToString:@"TestNotification"]) {
//highlight the view or label by changing color or text or what you want
}
关于ios - 如何在 View 上出现推送通知 AlertView 时突出显示特定 View 区域?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37941976/