How to show list of calendars

1.4k Views Asked by At

In my project i need to show list of calendars where user can select one, based on selection i need to fetch the events from device calendar app. Is there any way to show the default calendar list like the below image or should i customise the view

https://www.systutorials.com/136133/changing-iphone-holiday-calendar-local-one/holiday-calendar-iphone-us/

Please help this out.

3

There are 3 best solutions below

0
saj On

Have you ever try to use Cocoa pods where there are a huge number of calendar pods which you can easily use by just importing it.

  1. JTAppleCalendar

  2. Calendar

  3. XCalender

and there are many more that you can have a look at.

click on this cocoapods to get more cocoa pods example.

0
Akash Shindhe On
     let calendars =EventStore.calendars(for entityType:.Events)

// TO fetch Events

    let eventStore = EventsManager.getEventStore()



    var tempArray:[EKEvent] = []



    let predicate = eventStore.predicateForEvents(withStart: startdate, end: endDate, calendars: calendars)//nil will include all the calendars

    let events = eventStore.events(matching: predicate) as [EKEvent]

To fetch meetings from the calendar use this `Create your own UI with table view and sections and request permissions for Calendar . Then fetch calendars from the eventStore using .

0
jaclyn On

To display the view in your screenshot you want to use EKCalendarChooser. You can specify behaviors in response to user selections via EKCalendarChooserDelegate. Check out Apple's docs here: https://developer.apple.com/documentation/eventkitui/ekcalendarchooser