从Calendar事件(EKCalendarItem/EKEvent)中检索位置lat/long(CLLocationCoordinate2d)

Rob*_*erg 2 location calendar ekevent cllocationcoordinate2d ios8

EKCalendarItem有属性"位置",但它是一个NSString.新的iOS8功能显示了一个很好的事件地图,所以必须CLLocationCoordinate2D附加一个EKCalendarItem,正确的?我在哪里可以找到这个CLLocationCoordinate2D

And*_*ett 5

这应该得到你需要的:

for (EKEvent *calEvent in self.allMyEvents) {

   EKStructuredLocation *location = (EKStructuredLocation *)[calEvent valueForKey:@"structuredLocation"];

   if (location) {

   }

}
Run Code Online (Sandbox Code Playgroud)