I'm using DMPagerViewController
, but I tried used other ones, and they all appear to have similar behaviors.
I set up a git to try to understand what's happening: https://github.com/LucasCoelho/DMPager-Example
Basically I added twice, from the storyboard, a ViewController to the DMPagerViewController
and set it as the rootViewController
of a UINavigationController
who is the window's rootViewController
The view controller contains a UIButton
that pushes another instance of the same ViewController and a label who is set at viewWillAppear(_:)
who displays view.frame.size.height
What I'm struggling with is that the height of the first view shown doesn't match with the subsequent views pushed.
Can anyone please tell me why?
Here's some code if you don't want to download it on github:
App Delegate's application:didFinishLaunchingWithOptions
pagerController = DMPagerViewController(viewControllers:[firstViewController, secondViewController])
let navController = UINavigationController(rootViewController: pagerController)
navController.navigationBar.translucent = false
window?.rootViewController = navController