Stefan Lazic
Stefan Lazic

Reputation: 41

Add event to calendar xcode?

I have a basic app with a list view with manualy added cells.

How would i make it so that when a cell is clicked , a specific date is added to the iphone calendar?

Info - using latest xcode with storyboards

Upvotes: 0

Views: 1625

Answers (1)

Matthias
Matthias

Reputation: 8180

You should have a delegate for you list view that response to the UITableViewDelegate protocol. By tableView:didSelectRowAtIndexPath: you can catch the click to your cell. Then, use EKEventStore class to access your calendar. Your appointment is represented by an EKEvent.

EDIT

For more information you should consult the Introduction to Calendars and Reminders, Event Kit Framework Reference, and Table View Programming Guide.

This is the general approach, for a more detailed description you should tell, what your issues are and what did you try. Nobody at SO will write the program for you.

Upvotes: 2

Related Questions