简体   繁体   中英

Need a Concept to setting Local Notification with repeat interval set by user

I am creating an app feature to my existing app that will allow pharmacy patients to enter their name which will display a list of names in a table view, then click on a name, and there is another table view where they can add medications, and then click on a medication and there is another table view where they can add reminders to take their medications delivered via Local notifications. I have everything setup except for the form where they add a reminder where they select a time, am/pm, and are able to repeat every minute, or hour, or everyday and will also have a title of this reminder. For example, it will say "Aspirin" as a title, and then below it in a subtitle "8:00AM Everyday", then the next reminder on the list in the reminder table view would show "Aspirin" and "8:00Pm everyday". This form will allow them to add a reminder for each medication they take.

I just can't figure out what classes or frameworks I should start with this. I need the Alarm feature of the repeat interval and then I need that to turn into a notification. I think I can handle the rest as far as getting the information to show up in the table. But I need a way to build this simple form. Any Suggestions?

Use a custom class to hold your data for each reminder. Use NSDateComponents to store the time, and possibly the day of the week if the reminder doesn't repeat daily. Consider using a BOOL for if the reminder does repeat daily.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM