最佳答案
我尝试用这种方式注册我的本地通知应用程序:
UIApplication.sharedApplication().registerUserNotificationSettings(UIUserNotificationSettings(forTypes: UIUserNotificationType.Alert | UIUserNotificationType.Badge, categories: nil))
在 Xcode 7和 Swift 2.0-我得到错误 Binary Operator "|" cannot be applied to two UIUserNotificationType operands
。请帮助我。