Skip to content
This repository has been archived by the owner on Jun 24, 2020. It is now read-only.

Tab doesn't take the whole screen width on landscape view #30

Open
fayme opened this issue Oct 5, 2016 · 3 comments
Open

Tab doesn't take the whole screen width on landscape view #30

fayme opened this issue Oct 5, 2016 · 3 comments
Labels

Comments

@fayme
Copy link

fayme commented Oct 5, 2016

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!

@lfarah lfarah added the bug label Oct 7, 2016
@lfarah
Copy link
Collaborator

lfarah commented Oct 7, 2016

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?

@lfarah
Copy link
Collaborator

lfarah commented Oct 7, 2016

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")
        }
    }

@lucoceano
Copy link
Owner

@lfarah I will have a look this weekend

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants