草庐IT

firedate

全部标签

ios - 过去的 UILocationNotfication.fireDate - 错误?

根据Appledocs在UILocationNotification.fireDate上:Ifthespecifiedvalueisnilorisadateinthepast,thenotificationisdeliveredimmediately.我在使用过去的日期时没有看到这种行为。只有我看到了,还是其他人也看到了?这是我的代码:NSMutableArray*notifications=[NSMutableArrayarray];UILocalNotification*alarm=[[UILocalNotificationalloc]init];alarm.fireDate=[N

iphone - 是否有可能为 UILocalNotification 设置条件 `firedate`?

我正在尝试为我的本地通知设置一个有条件的触发时间,但是当我尝试这两种方法时它并没有失败,但它仍然没有用。所以,我想知道我是否能够做这样的事情?注意:startTime和endTime是来自日期选择器的时间。-(void)TEST{NSCalendar*calendar=[NSCalendarcurrentCalendar];calendar.timeZone=[NSTimeZonetimeZoneWithName:@"GMT"];NSDateComponents*components=[calendarcomponents:NSHourCalendarUnitfromDate:[NSD
12