2011-01-16 13 views
1

私はLocalNotificationアプリを作っていると私はこのような、テーブルビューをパブとき、すべては、しかし、dateComponentsためfireDateを設定した後、正常に動作している:UILocalNotification fireDate Q

NSArray *reminderArray = [[UIApplication sharedApplication] scheduledLocalNotifications]; 
UILocalNotification *notif = [reminderArray objectAtIndex:indexPath.row]; 


[cell.textLabel setText:notif.alertBody]; 
[cell.detailTextLabel setText:[notif.fireDate description ]]; 

detailtextlabelは1時間です早く時間が選んだ、私は問題を見つけることができません、適切なタイミングでアラームが発生します。

はSkovの

+0

タイムゾーンは何ですか?また、 '[notif.fireDate description]'の出力を投稿できますか? –

+0

NSDate * pickerDate = [NSDate date]; [self.datePicker setTimeZone:[NSTimeZone defaultTimeZone]]; [self.datePicker setDate:pickerDate]; – Skovie

+0

とthh notif.fireDateの説明は私に2011-01-16 22:18を与えていますが、選んだ時間は23:18です – Skovie

答えて

0

おかげでUIで日付を表示する[notif.fireDate description]を使用しないでください.... uは私を助けることができると思います。 AppleはいつでもNSDateの記述方法を変更することがあります。現在、GMTには表示されていますが、それは確かではありません。

NSDateFormatterを使用して画面に日付を表​​示します。

+0

ありがとうmann :-D – Skovie