Take a look at the documentation for EKCalendar. It's pretty simple, it has five properties, only one of which is a string called title
. Now if you have multiple calendars on your iPhone and you open iCal's Calendar settings, you can see that all calendars are nicely grouped by another string called account
.
What I can't figure out, is how to do the same, because although you can see the account
when you NSLog
a EKCalendar
instance, you can't access it:
EKCalendar <0x1851b0> {title = Work; type = CalDAV; account = some@addr.ess; allowsModify = YES; color = 0.690196 0.152941 0.682353 1.000000}
There is no account
property, and trying to access the valueForKey:@"account"
isn't working either, unsurprisingly.
So how do I get to that account
property? Such a simple thing, driving me nuts! Help is much appreciated.
Update: since iOS 5.0, EKCalendar has a source
property.