Swift中推送通知设置:Binary operator '|' cannot be applied to two UIUserNotificationType operands 错误解决
来源:互联网 发布:mac隐藏windows分区 编辑:程序博客网 时间:2024/06/05 11:38
在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)
0 0
- Swift中推送通知设置:Binary operator '|' cannot be applied to two UIUserNotificationType operands 错误解决
- Binary operator ‘|’ cannot be applied to two ‘UIViewAutoresizing’ operands
- 【iOS】swift-Binary operator '|' cannot be applied to two UIViewAutoresizing operands
- Swift Compiler Error Binary oprator '+' cannot be applied to operands of type 'UInt16' and 'UInt8'
- Swift2.0后"|" cannot be applied to two operands问题解决方法
- swift报错binary operator '==' cannot be applied of two(结构体枚举如何比较大小)
- Angular4中使用RxJS Observable的scan运算符 Operator '+' cannot be applied to types '{}'异常
- Error1Operator '+' cannot be applied to operands of type 'string' and 'method group'
- cannot be applied to
- 【java】遇到错误constructor ListNode in class ListNode cannot be applied to given types;
- Pymongo - TypeError: index 'xxxx' cannot be applied to Cursor instances
- ValueError: astimezone() cannot be applied to a naive datetime
- django cannot be applied to a naive datetime
- "invalid operands of types ‘float Point3d::*’ and ‘float Point3d::*’ to binary ‘operator<’"
- error: invalid operands of types ‘double’ and ‘double’ to binary ‘operator^’
- ERROR:invalid operands to binary -
- java hibernate 中"node to traverse cannot be null"错误解决
- java hibernate 中"node to traverse cannot be null"错误解决
- c语言链式存储实现
- Leetcode----205Isomorphic Strings
- [80]Remove Duplicates from Sorted Array II
- 第一个包含类的C++程序
- Android 微信授权登录、获取Wx用户信息,解决无法回调问题
- Swift中推送通知设置:Binary operator '|' cannot be applied to two UIUserNotificationType operands 错误解决
- android开发工具类之获得WIFI IP地址或者手机网络IP
- LeetCode Palindrome Number
- HDU 2844 Coins 多重背包
- ios学习之spritekit的简单学习
- 【Little_things】控制台五子棋(java)
- 杭电1106--替换空格
- session的使用
- Java语言使用注解处理器生成代码——第三部分:生成源代码