ios - 如何在 View 上出现推送通知 AlertView 时突出显示特定 View 区域?

标签 ios objective-c push-notification notifications uialertview

我是 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];

我收到如下图所示的警报

enter image description here

但是我想要下面的图片请帮助我

enter image description here

我该怎么做? 请帮助我。:)

最佳答案

使用自定义 View 或标签使其突出显示。

使用下面的代码通知您的 View Controller 。

Use Notifier

在链接的函数下方添加您的代码段

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/

相关文章:

java - 如何从 Web 应用程序向移动应用程序发送通知给特定用户

ios - 为什么通过 Multipeer Connectivity 发送的字符串在接收端出现乱码?

ios - 使用 NSOperationQueue,如何添加到后台队列而不是主队列,以及如何控制操作量?

iOS 将自定义框架导入项目

java - 使用 Springboot 进行预定的 websocket 推送

android - GCM客户端未收到推送通知

ios - 如何返回 numberOfRowsInSection?

ios - 如何根据 iPad 上的方向更改布局?

ios - 禁用 ios 应用程序的蜂窝数据

ios - 我可以在没有配置文件的情况下使用 jenkins 构建 iOS 项目吗?