-
Notifications
You must be signed in to change notification settings - Fork 267
Open
Description
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
let appDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.isLandscape = true
let value = UIInterfaceOrientation.landscapeRight.rawValue
UIDevice.current.setValue(value, forKey: "orientation")
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
let appDelegate = UIApplication.shared.delegate as! AppDelegate
appDelegate.isLandscape = false
let unknownValue = UIInterfaceOrientation.unknown.rawValue
UIDevice.current.setValue(unknownValue, forKey: "orientation")
let orientationTarget = UIInterfaceOrientation.portrait.rawValue
UIDevice.current.setValue(orientationTarget, forKey: "orientation")
}
func cliek(){
Toast(text: "what happend? ???").show()
}Please contact me if you need sample projects or duplicate projects. My mailbox [email protected]
Metadata
Metadata
Assignees
Labels
No labels
