【发布时间】:2016-09-20 09:46:55
【问题描述】:
我在 swift 2.2 中工作正常,但是当我转换到 swift 3.0 时出现错误。
//If app open by notification
if launchOptions != nil
{
NSLog("launch------ %@", launchOptions!)
let userInfo = launchOptions!(UIApplicationLaunchOptionsKey.remoteNotification) as NSDictionary
if userInfo != nil
{
self.application(UIApplication.shared, didReceiveRemoteNotification: (userInfo)! as! [NSObject : AnyObject])
}
}
类似错误
不能调用非函数类型'[NSObject : Any]'的值
提前致谢。
【问题讨论】:
标签: swift push-notification swift3