如何更改日历的名称?我有:
EKCalendar *cal;
cal=[store calendarWithIdentifier:@"5F9A5BE0-03A9-4FE8-BD1E-2647F39E268F"];
cal.title = @"Calendar custom 2";
cal.source = localSource;
NSError *error = nil;
BOOL saved = [store saveCalendar:cal commit:YES error:&error];
NSLog(@"%d -> %@",saved,error);
但这并没有保存,这个打印:
0 -> Error Domain=EKErrorDomain Code=15 "That calendar may not be moved to another account." UserInfo=0xb05c8a0 {NSLocalizedDescription=That calendar may not be moved to another account.}
有人可以帮助我!!
最佳答案
根据文档 source
无法更改,请尝试仅更改 title
属性。
关于ios - 在 iOS 中重命名 EKCalendar,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20957879/