2

I tried to set the position of a component by using CGRect containing the position.

 pageMenu = CAPSPageMenu(viewControllers: controllerArray, frame: CGRect(x:0.0, y:(self.navigationController?.navigationBar.intrinsicContentSize.height)!, width:self.view.frame.width, height:self.view.frame.height), pageMenuOptions: parameters)

and y is set to self.navigationController?.navigationBar.intrinsicContentSize.height

But when I run my app on the simulator, it shows the menu bar underneath the navigation bar. I don't know why. I already set the y coordinate to the height of navigation bar. Please help.

enter image description here

And this is my StoryBoard.

enter image description here

Patroclus
  • 1,163
  • 13
  • 31

1 Answers1

1

Set this for the view controller that hides under the navigation bar

viewController.edgesForExtendedLayout = []
mag_zbc
  • 6,801
  • 14
  • 40
  • 62