UILocalNotification问题 [英] UILocalNotification Problem

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

问题描述

我有一个本地通知,我想每隔5分钟开一次。我使用:

I have a local notification that I would like to fire every 5 minutes. I use:

 localNotif.repeatInterval = NSMinuteCalendarUnit

将每分钟发出一次通知。我无法弄清楚如何每5分钟或其他> 1分钟间隔发生这种情况。我试过了:

that will have the notification happen once every minute. I can't figure out how to get this to happen every 5 minutes or whatever other >1 minutes interval. I've tried:

localNotif.repeatInterval= 5 * NSMinuteCalendarUnit 

这不起作用。任何人都可以帮我解决这个问题。

and that doesn't work. Can anyone help me to solve this problem.

推荐答案

jissa你不能通过5 * NSMinuteCalendarUnit设置5分钟的间隔。 UILocalNotification的当前实现不允许您微调间隔。所以你每秒钟,每分钟,每小时,每天,每周,每个月等等都会遇到困难等等。

jissa you can't set a 5 minute interval by doing a 5 * NSMinuteCalendarUnit. The current implementation of UILocalNotification does not allow you to fine tune the interval. So you're stuck with every second, every minute, every hour, every day, every week, every month... etc etc.

我提交了一个错误报告/增强 http://bugreport.apple.com/

I've filed a bug report/enhancement at http://bugreport.apple.com/

您可以查看我在Open Radar上存档的报告: http:// openradar .appspot.com / radar?id = 759402

You may take a look at my report archived at Open Radar: http://openradar.appspot.com/radar?id=759402

根据Instapaper的开发人员Marco的说法,Apple优先考虑增强功能和功能请求,部分原因是开发人员有多少请求他们。

According to Marco, developer of Instapaper, Apple prioritizes enhancement and feature requests partly based on how many developers are requesting them.

如果此功能对您很重要,我也建议您提交报告。

If this feature is important to you I urge you to file a report as well.

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

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