Lots of UILocalNotification
I need to install different UILocalNotification
I have
StartDate:Starting date from which notification starts(using date picker)
EndDate: enddate upto when notfication fire(using date picker)
// select another time (maximum 5 times) from the date picker
time1tofire:HH:MM
time2tofire:HH:MM
time3tofire:HH:MM
time4tofire:HH:MM
time5tofire:HH:MM
I know I can set different daily UILocalNotification reapeat with the following CalenderUnit property
NSEraCalendarUnit
NSYearCalendarUnit
NSMonthCalendarUnit
NSDayCalendarUnit
NSHourCalendarUnit
NSMinuteCalendarUnit
NSSecondCalendarUnit
NSWeekCalendarUnit
NSWeekdayCalendarUnit
NSWeekdayOrdinalCalendarUnit
NSQuarterCalendarUnit
And setting a simple notification like
- (IBAction)addNotification:(id)sender {
UILocalNotification *localNotification = [[UILocalNotification alloc] init]; //Create the localNotification object
[localNotification setFireDate:[NSDate dateWithTimeIntervalSinceNow:[datePicker countDownDuration]]]; //Set the date when the alert will be launched using the date adding the time the user selected on the timer
[localNotification setAlertAction:@"Launch"]; //The button text that launches the application and is shown in the alert
[localNotification setAlertBody:[alertBodyField text]]; //Set the message in the notification from the textField text
[localNotification setHasAction: YES]; //Set that pushing the button will launch the application
[localNotification setApplicationIconBadgeNumber:[[UIApplication sharedApplication] applicationIconBadgeNumber]+1]; //Set the Application Icon Badge Number of the application icon to the current Application Icon Badge Number plus 1
[[UIApplication sharedApplication] scheduleLocalNotification:localNotification]; //Schedule the notification with the system
[localNotification release];
[alertNotification setHidden:NO]; //Set the alertNotification to be shown showing the user that the application has registered the local notification
}
My question is:
How do I bind a UILocalNotification to start between StartDate and End Date?
How can I set UILocalNotification on those days with different times (select HH: ss format using date picker) using CalenderUnit?
+1
source to share
No one has answered this question yet
See similar questions:
or similar: