Как получить встроенные календари с помощью 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
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

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