1
var categories: NSSet = NSSet(object: firstCategory)
let types: UIUserNotificationType = UIUserNotificationType.Badge | UIUserNotificationType.Alert
没有工作,并说二进制运算符'|'不能适用于两个“UIUserNotificationType”操作数UIUserNotificationSettings不能工作
var categories: NSSet = NSSet(object: firstCategory)
var mySettings = UIUserNotificationSettings = UIUserNotificationSettings(forTypes: [.Alert, .Badge], categories: categories)
也没有工作,并表示无法指定类型的不可变的表达“UIUserNotificationSettings.Type
哇,非常感谢,我写错误':'为'='...... – postman99
有时Swift错误有误导性。 – Mark