Binary operator ‘|’ cannot be applied to two ‘UIViewAutoresizing’ operands
来源:互联网 发布:电脑网络共享怎么取消 编辑:程序博客网 时间:2024/05/29 18:29
OC的写法:
_tableView.autoresizingMask= UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight
swift的写法:
_tableView.autoresizingMask= .flexibleHeight | .flexibleWidth
Binary operator ‘|’ cannot be applied to two ‘UIViewAutoresizing’ operands
错误原因是:
swift 2.x 和swift 3 对于OptionSetType这个类型进行了优化升级修改。
解决方案是:
_tableView.autoresizingMask = [.flexibleHeight,.flexibleWidth]
0 0
- Binary operator ‘|’ cannot be applied to two ‘UIViewAutoresizing’ operands
- 【iOS】swift-Binary operator '|' cannot be applied to two UIViewAutoresizing operands
- Swift中推送通知设置:Binary operator '|' cannot be applied to two UIUserNotificationType operands 错误解决
- Swift2.0后"|" cannot be applied to two operands问题解决方法
- Swift Compiler Error Binary oprator '+' cannot be applied to operands of type 'UInt16' and 'UInt8'
- swift报错binary operator '==' cannot be applied of two(结构体枚举如何比较大小)
- Error1Operator '+' cannot be applied to operands of type 'string' and 'method group'
- cannot be applied to
- Angular4中使用RxJS Observable的scan运算符 Operator '+' cannot be applied to 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 -
- The "." operator was supplied with an index value of type "java.lang.String" to be applied to a List
- Android Studio 那些事| ' ' cannot be applied to '(groovy.lang.Closure)'
- Android Studio 使用二三事----' ' cannot be applied to '(groovy.lang.Closure)'
- TortoiseGit 代码回退版本
- 微信小程序引入weui组件
- 利用wsdl2java生成本地WebService客户端
- Linux下的SVN服务器搭建(亲测可行)
- linux下mysql用c语言,插入,删除,查询,实例
- Binary operator ‘|’ cannot be applied to two ‘UIViewAutoresizing’ operands
- 11 继承,多重继承与虚继承
- phpStrom2016.3激活教程
- 浏览器兼容性:停止事件冒泡和阻止浏览器的默认
- 在 Linux 上给用户赋予指定目录的读写权限
- android开发笔记之Makefile(一)
- Android实战:多线程断点续传下载器实现
- 解析 HTTP(HttpURLConnection getResponseCode)
- docker部署更改php的upload_max_filesize