-3

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.

rmaddy
  • 314,917
  • 42
  • 532
  • 579
Test Test
  • 1,761
  • 3
  • 10
  • 12

3 Answers3

1

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

jaclyn
  • 21
  • 4
0

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.

saj
  • 144
  • 1
  • 8
0
     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 .

Akash Shindhe
  • 558
  • 4
  • 16