Esqarrouth / EZSwipeController

:point_up_2: UIPageViewController like Snapchat/Tinder/iOS Main Pages
MIT License
843 stars 71 forks source link

The Navigation Bar overlaps the status bar by default #54

Open mrigdon-zz opened 7 years ago

mrigdon-zz commented 7 years ago

Here's my code:

extension SwipeController: EZSwipeControllerDataSource {
    func viewControllerData() -> [UIViewController] {
        let redVC = UIViewController()
        redVC.view.backgroundColor = .red

        let blueVC = UIViewController()
        blueVC.view.backgroundColor = .blue

        let greenVC = UIViewController()
        greenVC.view.backgroundColor = .green

        return [redVC, blueVC, greenVC]
    }

    func titlesForPages() -> [String] {
        return ["red", "blue", "green"]
    }
}

class SwipeController: EZSwipeController {

    // MARK: - Lifecycle methods

    override func viewDidLoad() {
        super.viewDidLoad()
        view.backgroundColor = .yellow
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
    }

    override func setupView() {
        datasource = self
    }

}

pretty much exactly how it's done in the readme, but here's what I get:

simulator screen shot mar 1 2017 12 01 46 pm

As you can see the either the navigation bar is too small or it's overlapping with the status bar.

patthehuman commented 7 years ago

Any update on this? I'm having the same issue

darraghmckay commented 7 years ago

No update on this? I'm experiencing the same thing. It only occurred after I updated my pods

mzrzvi commented 7 years ago

yup happening for me too 👎

Kleemann commented 7 years ago

There is a property called public static let navigationBarHeight: CGFloat = 44

You can change that if you installed the library manually or maybe by subclassing EZSwipeController.

lohithkorp commented 6 years ago

Any update on this? @Kleemann : changing 44 doesn't fix this issue on ios11. I have already tried that. Any other workaround/suggestion?

sarbogast commented 5 years ago

Same problem here. Did anybody find a solution?