Home  >  Q&A  >  body text

ios - 我要做一个本地闹钟,有一个免打扰模式,可以自己设置在哪个区间不触发这个通知,怎么做到呢,大家有没有好的思路

我要做一个iOS本地提醒闹钟,有一个免打扰模式,可以自己设置在哪个区间不触发这个通知,怎么做到呢,大家有没有好的思路。

我感觉那个时间点不好获取,特别是通知模式时要在来通知的时候判断是否在那个时间段,还是重新把本地闹钟再写一遍,本地闹钟能设置区间吗,在线等啊。。。。

ringa_leeringa_lee2765 days ago420

reply all(1)I'll reply

  • 高洛峰

    高洛峰2017-04-17 17:38:53

    Sorry, I have never made an alarm clock. The alarm clock I understand is a local notification~ I think if you know the time period first and then the alarm time, you can set the local notification time to avoid that time period. If you set the alarm first and then set the time period, you can cancel the local notification first and then reset it. I haven't done it yet, but I think this should meet the requirements.

    reply
    0
  • Cancelreply