开发者

UILocalNotification - Fire 30 minutes before an NSDate

I am making an app that will fire a notification 30 minutes b开发者_开发百科efore an event. I calculate the NSDate and set the notification with this huge code: http://pastie.org/private/3n9z6c06i17i8h8giing

However, the notification never fires. Could anyone please help me?


I see that you've set the notification.fireDate as:
[notification setFireDate:[NSDate dateWithTimeIntervalSinceNow:[remain second]]];

But, your notification.timeZone doesn't appear to be set, so you're relying on the default?

Even though, you have:
[parser setTimeZone:[NSTimeZone timeZoneForSecondsFromGMT:14400]];

Try using this instead:
notification.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:14400];

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜