1.Swift強制旋轉(zhuǎn)屏幕設(shè)置
關(guān)鍵代碼:
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let value = UIInterfaceOrientation.portrait.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
}
未完待續(xù)~~~