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]