iPhone - UILocalNotification 作为警报 [英] iPhone - UILocalNotification as alarm

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

问题描述

即使我的 iPhone 应用程序在后台,我如何使用 UILocalNotification 在每天晚上 8 点显示我的闹钟?

Even when my iPhone application is in background, How can I use UILocalNotification to show my alram every day at 8.00 PM?

推荐答案

fireDate 设置为 8.00 PM 并将 repeatInterval 设置为 NSDayCalendarUnit并使用 [[UIApplication sharedApplication] scheduleLocalNotification: myNotification];

Set the fireDate to 8.00 PM and set the repeatInterval to NSDayCalendarUnit and schedule the alert with [[UIApplication sharedApplication] scheduleLocalNotification: myNotification];

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

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