【发布时间】:2015-09-14 05:50:42
【问题描述】:
自从我安装了 xCode 7 beta2 + Swift 2.0,我的应用程序中出现了一些错误。例如,我收到以下错误
“不能使用类型为'(EKEntityType, completion: (Bool, NSError!) -> _)'的参数列表调用'requestAccessToEntityType'
在这部分代码中:
eventStore.requestAccessToEntityType(EKEntityType.Event,
completion: {(granted: Bool, error:NSError!) in
if !granted {
print("Access to store not granted")
}
})
还有这个错误:
无法使用类型为“(NSDate,endDate:NSDate,日历:[AnyObject])”的参数列表调用“predicateForEventsWithStartDate”
在这部分代码中:
calendarsPrueba.addObject(calendarWithName("US Holidays")!)
var predicate2 = eventStore.predicateForEventsWithStartDate(startDate, endDate: endDate, calendars: calendarsPrueba as [AnyObject])
有人知道如何解决这个问题吗?没有关于此的 Apple 文档
【问题讨论】:
-
你运行了迁移器吗?
标签: ios xcode swift swift2 xcode7-beta2