我在 Swift 中使用了 iBeacon 库,
// Listening Notifications
func registerNotifications() {
NSNotificationCenter.defaultCenter().addObserver(self, selector: Selector.convertFromStringLiteral("handleNotification:"), name: kBUOYDidFindBeaconNotification, object: nil)
}
使用iOS8.1 SDK后,小编说:
'Selector.Type' does not have a member named 'convertFromStringLiteral'
我怎么解决这个问题?我尝试了以下代码但无法正常工作。
Selector("handleNotification:")