如何显示UIAlertView的本地通知,而不是显示在ios7屏幕顶部的标签通知? [英] How to show UIAlertView for local notification instead of the label-notification which appear at top of the screen in ios7 ?

查看:93
本文介绍了如何显示UIAlertView的本地通知,而不是显示在ios7屏幕顶部的标签通知?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因为我认为除了iOS5之外他们会删除 UIAlertView 而不是一个标签出现在我不想要的屏幕顶部,我使用的是这个代码,但它并没有。吨触发alertview,我需要localnotification的旧外观

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.

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

请帮助,提前致谢!

推荐答案

无法以编程方式在我们的应用程序中更改通知警报样式。根据用户的意愿显示此警报样式。如果您在iPhone中看到 settings->通知中心,您可能会看到所有已注册通知的应用程序。用户可以根据自己的意愿更改每个应用程序的警报样式。这不在我们手中。

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. The user can change the alert style for each application based on their wish. This is not in our hand.

这篇关于如何显示UIAlertView的本地通知,而不是显示在ios7屏幕顶部的标签通知?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆