草庐IT

uilocalnotifications

全部标签

ios - 关闭已经传送的 UILocalNotification?

这有可能吗?UIApplication'sscheduledLocalNotifications似乎没有返回已经发送到用户通知中心的通知,所以我认为这可能是设计使然,但我找不到任何有据可查的证据。有人知道吗?谢谢!编辑:发现这个:YoucancancelaspecificschedulednotificationbycallingcancelLocalNotification:ontheapplicationobject,andyoucancancelallschedulednotificationsbycallingcancelAllLocalNotifications.Bothof

ios - 关闭已经传送的 UILocalNotification?

这有可能吗?UIApplication'sscheduledLocalNotifications似乎没有返回已经发送到用户通知中心的通知,所以我认为这可能是设计使然,但我找不到任何有据可查的证据。有人知道吗?谢谢!编辑:发现这个:YoucancancelaspecificschedulednotificationbycallingcancelLocalNotification:ontheapplicationobject,andyoucancancelallschedulednotificationsbycallingcancelAllLocalNotifications.Bothof

ios - 如何为 UILocalNotification 添加声音?

我已经完成了我的应用程序的基本通知。我想为我的通知添加音效。UILocalNotification*localNotification=[[UILocalNotificationalloc]init];if(localNotification==nil)return;localNotification.fireDate=[NSDatedate];//localNotification.timeZone=[NSTimeZonedefaultTimeZone];localNotification.alertBody=msg;localNotification.soundName=@"Mor

ios - 如何为 UILocalNotification 添加声音?

我已经完成了我的应用程序的基本通知。我想为我的通知添加音效。UILocalNotification*localNotification=[[UILocalNotificationalloc]init];if(localNotification==nil)return;localNotification.fireDate=[NSDatedate];//localNotification.timeZone=[NSTimeZonedefaultTimeZone];localNotification.alertBody=msg;localNotification.soundName=@"Mor

iOS UILocalNotification 设置为每天触发一次,每两天触发一次,并且仅在星期日触发

我正在尝试使用设置包来安排UILocalNotification。在设置中,您可以选择是否希望每天收到通知(1次/天)、每2天1次、仅在星期日或从不。这是我使用的代码(全部在AppDelegate.m中):-(void)defaultsChanged:(NSNotification*)notification{[[UIApplicationsharedApplication]cancelAllLocalNotifications];[[NSUserDefaultsstandardUserDefaults]synchronize];NSString*testValue=[[NSUserD

iOS UILocalNotification 设置为每天触发一次,每两天触发一次,并且仅在星期日触发

我正在尝试使用设置包来安排UILocalNotification。在设置中,您可以选择是否希望每天收到通知(1次/天)、每2天1次、仅在星期日或从不。这是我使用的代码(全部在AppDelegate.m中):-(void)defaultsChanged:(NSNotification*)notification{[[UIApplicationsharedApplication]cancelAllLocalNotifications];[[NSUserDefaultsstandardUserDefaults]synchronize];NSString*testValue=[[NSUserD

iphone - UILocalNotification 自定义声音不在 iOS7 中播放

我在应用程序中使用UILocalNotification。在应用程序中有两种有条件地播放的声音-我已经为它们应用了适当的条件。但是当我安装应用程序并在iOS7设备上运行它时,它会触发本地通知,但应用程序中没有播放声音。下面给出了设置通知的代码:UILocalNotification*localNotification=[[UILocalNotificationalloc]init];if(localNotification==nil)return;localNotification.fireDate=[pickerViewdate];localNotification.timeZone

iphone - UILocalNotification 自定义声音不在 iOS7 中播放

我在应用程序中使用UILocalNotification。在应用程序中有两种有条件地播放的声音-我已经为它们应用了适当的条件。但是当我安装应用程序并在iOS7设备上运行它时,它会触发本地通知,但应用程序中没有播放声音。下面给出了设置通知的代码:UILocalNotification*localNotification=[[UILocalNotificationalloc]init];if(localNotification==nil)return;localNotification.fireDate=[pickerViewdate];localNotification.timeZone

ios - 有没有一种简单的方法来编辑/修改 UILocalNotification

是否有更简单的方法来编辑,例如,已安排的UILocalNotification的alertBody属性?现在,我只是取消通知并安排一个新通知,但是当应用需要为3个或更多通知执行此操作时,执行需要很长时间... 最佳答案 如果文档是正确的,您就不能更改已经安排好的通知。-scheduleLocalNotification:的文档说明:[…]Becausetheoperatingsystemcopiesnotification,youmayreleaseitonceyouhavescheduledit.通知对象由系统复制,不能通过任何(

ios - 有没有一种简单的方法来编辑/修改 UILocalNotification

是否有更简单的方法来编辑,例如,已安排的UILocalNotification的alertBody属性?现在,我只是取消通知并安排一个新通知,但是当应用需要为3个或更多通知执行此操作时,执行需要很长时间... 最佳答案 如果文档是正确的,您就不能更改已经安排好的通知。-scheduleLocalNotification:的文档说明:[…]Becausetheoperatingsystemcopiesnotification,youmayreleaseitonceyouhavescheduledit.通知对象由系统复制,不能通过任何(