I have prepared an Alarm Clock app which uses UILocalnotification for scheduling the alarm.Now after the alarm has been set, I want to make a switch so that I can turn it ON and OFF usingUISwitch.I just cant figure how can I do that?What I am thinking as of now is that when you switch OFF the alarm, I shall store the DATE and TIME value before canceling the UILocalnotification so that when the user again switch ON the alarm I reschedule it with the stored DATE and TIME values. Is it the right way to do or is there any other ways to do that?
I have prepared an Alarm Clock app which uses UILocalnotification for scheduling the alarm.Now
Share
just make the database table which have ‘date’, ‘isCanceled’ field and unique id ‘alarmId’ columns (use rest whatever you want). so when the user wants to cancel the alarm try this,
to use this better you create your alarm by,