简体   繁体   English

如何显示UIAlertView用于本地通知,而不是显示在ios7屏幕顶部的标签通知?

[英]How to show UIAlertView for local notification instead of the label-notification which appear at top of the screen in ios7 ?

because I think beyond iOS5 they remove UIAlertView instead of one label appear at the top of screen which I don't want,I am using this code but it doesn't trigger alertview, i need old look of localnotification. 因为我认为在iOS5以后,它们删除了UIAlertView而不是在屏幕顶部出现了我不希望出现的标签,我正在使用此代码,但它不会触发Alertview,因此我需要使用老式的localnotification外观。

UILocalNotification* localNotification = [[UILocalNotification alloc] init];
localNotification.fireDate = pickerDate;
localNotification.alertBody = self.itemText.text;
localNotification.alertAction = @"Show me the item";
localNotification.timeZone = [NSTimeZone defaultTimeZone];
localNotification.applicationIconBadgeNumber = [[UIApplication sharedApplication] applicationIconBadgeNumber]  [[UIApplication sharedApplication] scheduleLocalNotification:localNotification];

please Help, Thanks in Advance! 请帮助,在此先感谢!

The notification alert style cannot be changed in our application programmatically. 通知警报样式无法在我们的应用程序中以编程方式更改。 This alert styles shown based on the user wish. 此警报样式根据用户的意愿显示。 If you see in iPhone settings-> notification center , you may see all the applications registered for notifications. 如果在iPhone settings-> notification center看到,则可能会看到所有已注册用于通知的应用程序。 The user can change the alert style for each application based on their wish. 用户可以根据自己的意愿更改每个应用程序的警报样式。 This is not in our hand. 这不在我们手中。

This is not up to the control of the app or the developer (using public API). 这不受应用程序或开发人员的控制(使用公共API)。 The user can decide if and how to receive notifications from your app. 用户可以决定是否以及如何从您的应用程序接收通知。 You may suggest you your user on first launch/tutorial/help that for best experience, you may want to enable alerts instead of banners and perhaps display visual cues on how to do it. 您可能会建议您的用户在首次启动/教程/帮助中获得最佳体验,而您可能希望启用警报而不是横幅,并可能显示有关如何执行操作的视觉提示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM