大熊猫猪·侯佩原创或翻译作品.欢迎转载,转载请注明出处. 如果觉得写的不好请多提意见,如果觉得不错请多多支持点赞.谢谢! hopy ;)
接上一篇,我们来看一下如何根据类型和名称找到一个特定的日历源,首先我们写一个帮助方法:
-(EKSource*)sourceInEventStore:(EKEventStore*)store sourceType:(EKSourceType)type sourceTitle:(NSString*)title{ for (EKSource *source in store.sources) { if (source.sourceType == type && [source.title caseInsensitiveCompare:title] == NSOrderedSame) { return source; } }