在swif2.0中,推送设置不能使用|,
如果这么:let setting = UIUserNotificationSettings(forTypes: .Alert|.Badge|.Sound, categories: nil )
会提示错误 :Binary operator '|' cannot be applied to two UIUserNotificationType operands
解决办法:
let setting = UIUserNotificationSettings(forTypes: [.Alert,.Badge,.Sound], categories: nil)