Open fayme opened 8 years ago
I just did some tests. I was able to hide the tabbar and navigation bar but I wasn't able to set the contentView to fullscreen. @lucoceano any thoughts?
Code used:
override func viewDidLoad() {
// Some code
NotificationCenter.default.addObserver(self, selector: #selector(ViewController.rotated), name: NSNotification.Name.UIDeviceOrientationDidChange, object: nil)
}
func rotated() {
if UIDeviceOrientationIsLandscape(UIDevice.current.orientation) {
tabsView?.isHidden = true
self.navigationController?.isNavigationBarHidden = true
print("landscape")
}
if UIDeviceOrientationIsPortrait(UIDevice.current.orientation) {
tabsView?.isHidden = false
self.navigationController?.isNavigationBarHidden = false
print("Portrait")
}
}
@lfarah I will have a look this weekend
Whenever i am rotating the app from portrait to landscape i want my view to take the whole space in the mode. Let me know if its possible to do!