问题:
- (void) application:(UIApplication *)application didReceiveLocalNotification:(UILocalNotification *)notification
Run Code Online (Sandbox Code Playgroud)
有时用iOS7不会调用.它不会影响我们如何安排通知:
alarm.fireDate = [[NSDate date] dateByAddingTimeInterval:0.1];
[app scheduleLocalNotification:alarm];
Run Code Online (Sandbox Code Playgroud)
要么:
[app presentLocalNotificationNow:alarm];
Run Code Online (Sandbox Code Playgroud)
我的想法:当用户在通知警报动画完成之前滑动时会发生这种情况.如果他在滑动之前等待半秒钟 - 通知被解雇,应用程序按预期进行.问题可能是应用程序在收到通知之前进入前台.
有没有人见过这个?这是一个错误吗?有解决方案吗 谢谢!