[英]how to create a calendar in the native iOS 6 calendars app?
I have a requirement where in I need to set up reminders / events, but they shouldn't be in the default calendar. 我有一个需要在何处设置提醒/事件的要求,但它们不应位于默认日历中。 So I was looking for a way to add a custom calendar to the native calendar app in iPhone.
因此,我一直在寻找一种将自定义日历添加到iPhone中的本机日历应用程序的方法。 But on looking up the EventKit framework I learned that the method " calendarWithEventStore: " has been deprecated since iOS 6 .
但是在查找EventKit框架时,我了解到自iOS 6起 ,方法“ calendarWithEventStore:”已被弃用 。 Is there any other way or work around for this.
还有其他方法或解决方法。
Use calendarForEntityType:eventStore:
instead, which allows specifying the entity type as well (events or reminders). 请改使用
calendarForEntityType:eventStore:
它也可以指定实体类型(事件或提醒)。 Note that to support iOS 5 and earlier, you must check if this method is NULL before calling it (or fall back to the old calendarWithEventStore:
). 请注意,要支持iOS 5及更早版本,必须在调用此方法之前检查此方法是否为NULL(或回退到旧的
calendarWithEventStore:
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.