swift如何同时设置多个枚举值,有两种方式
1.通过rawValue方法赋值
self.tableView.autoresizingMask = UIViewAutoresizing(rawValue: UIViewAutoresizing.flexibleHeight.rawValue | UIViewAutoresizing.flexibleWidth.rawValue)
2.通过中括号的形式赋值
self.tableView.autoresizingMask = [.flexibleWidth,.flexibleHeight]
网友评论