iPhone关闭时的UILocalNotification [英] UILocalNotification when iPhone switched off

查看:92
本文介绍了iPhone关闭时的UILocalNotification的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当设备关闭时安排UILocalNotofication会发生什么。

What happens when a UILocalNotofication is scheduled when a device is switched off.

例如。我每天下午3点安排一次UILocalNotification。但该设备从下午3:00到下午4:00关闭。我猜以下任何一种情况都属实。

Eg. I schedule a UILocalNotification at 3pm everyday. But the device is switched off from 3:00pm to 4:00pm. I guess any one of the following conditions will be true.


  • 设备重启后没有通知。

  • 重启设备时会触发通知,即下午4:00

我没有设备且无法测试它在模拟器上。

I do not have a device and could not test it on a simulator.

注意:关闭我意味着设备已关闭,而不是睡眠/待机模式

推荐答案

当您关闭设备时,通知将变为不存在,因此当您重新打开设备时,什么都不会在没有再次创建通知的情况下发生。

When you turn off your device, the notification becomes non-existant, so when you turn your device back on, nothing is going to happen without creating that notification again.

因此,如果您安排3PM的活动,并且您的设备在下午2:59关闭,那么请在下午3:59返回通知不会触发,因为它必须重新创建。

So if you schedule an event for 3PM and your device is turned off at 2:59PM, then back on at 3:59PM, the notification will not fire because it has to be recreated.

这篇关于iPhone关闭时的UILocalNotification的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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