Как получить встроенные календари с помощью Swift?IOS

Программируем под IOS
Anonymous
Как получить встроенные календари с помощью Swift?

Сообщение Anonymous »


I want to get subscription calendar ('USOS' calendar from screenshot) but I can't filter builtin calendars such as 'US Holidays' or 'Święta w Polsce'. So my question is how to filter builtin calendars in other way than just filtering their name.

Screenshot from calendar:


Изображение


After getting full access to events I'm doing this to get calendars

var calendars = eventStore.calendars(for: .event) Then I tried to filter results with

calendars = calendars.filter { $0.type == .subscription } But there is still calendar 'Święta w Polsce'.

I also tried properties such as 'allowsContentModifications', 'isSubscribed' and 'isImmutable' but for 'Święta w Polsce' and subscription calendar all these properties have the same value.


Источник: https://stackoverflow.com/questions/780 ... sing-swift

Вернуться в «IOS»