특정 날짜에 UILocalNotification
을 발사하고 싶습니다. 이 코드를 사용하는 경우 :특정 날짜의 화재 UILocalNotification
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
NSDateComponents *components = [gregorian components:NSYearCalendarUnit | NSMonthCalendarUnit | NSDayCalendarUnit fromDate:[NSDate date]];
[components setHour:4];
[components setMinute:0];
NSDate *fireDate = [gregorian dateFromComponents:components];
지금은 오후 3시이면 제대로 작동하지만 예를 들어 오후 5 시가되면 작동하지 않습니다.
어떻게 통지 발사 일을 "다음 4 pm"으로 설정할 수 있습니까? 24 시간 형식의 코드를 다음
은 : - 당신은 자동으로 경보를 매 시간마다 반복합니다 있습니까? 어떻게 알람을 설정 하시겠습니까? –
저는 특정 시간에만 사용자가 앱에서 할 수있는 일을 알리고 자합니다. 알림을 반복해서는 안됩니다. 답장을 보내 주셔서 감사합니다. – Lolloz89
내가 알기로는 특정 시간에 매일 알림을 반복하고 싶습니까? –