2

I'm using this library to create a side menu in iOS, using Swift 4.

But, this only works for smaller screens like the iPhone SE or 5S. On bigger screens like the iPhone 6, this does not work as the side menu does not extend all the way down to the bottom of the screen:

screenshot of side menu that doesn't go all the way down

My code to create my side menu in MainViewController:

let menuLeftNavigationController = storyboard!.instantiateViewController(withIdentifier: "LeftMenuNavigationController") as! UISideMenuNavigationController
SideMenuManager.default.menuWidth = 260 
SideMenuManager.default.menuLeftNavigationController = menuLeftNavigationController
SideMenuManager.default.menuFadeStatusBar = false
SideMenuManager.default.menuPresentMode = .menuSlideIn
SideMenuManager.default.menuAnimationFadeStrength = 0.5
SideMenuManager.default.menuShadowOpacity = 0.8

// open with present
self.present(SideMenuManager.default.menuLeftNavigationController!, animated: true, completion: nil)

ViewController with SideMenu:

storyboard screenshot

shim
  • 9,289
  • 12
  • 69
  • 108
Augusto
  • 3,825
  • 9
  • 45
  • 93
  • Are you using autolayout constraints in the storyboard? – shim Jun 06 '18 at 00:47
  • When I set constraint the height set correctely but the contentes inside view turns wrongs. – Augusto Jun 06 '18 at 00:50
  • What do you mean? You have to make sure to add correct constraints to all the components of the view (such as your label, that image, etc). – shim Jun 06 '18 at 00:51
  • I did positioned all components and set all constraints. I'll try to do it all over again. – Augusto Jun 06 '18 at 00:54
  • You could post screenshots of your constraints and what the problem with the "contents inside turned wrong" looks like. – shim Jun 06 '18 at 00:55
  • seems like you are providing static height to SideMenu, – iOS Geek Jun 06 '18 at 05:20

2 Answers2

0

Tried to set leading, top, bottom and width constraint.

Dani
  • 3,427
  • 3
  • 28
  • 54
0

Actually, i faced such problems every time i used storyboards or xibs to make UI for different screen sizes. You can try to create this menu controller programmatically and then problem should go away.

MIhail
  • 28
  • 5