Placement hamburger button wrong iOS 11
StevenVerheyen opened this issue · 4 comments
Hi!
After upgrading to Xcode 9 and iOS 11, the hamburger button has been moved slightly to the right. I cannot find a fix for this.
On the screenshot you can see the hamburger menu with a red background color just to highlight the bounds of it. As you can see, on simulator at the right (which is iOS 11), the hamburger button is a bit more to the right. This has been tested on both real devices and simulators and it occurs on both. So it is not a simulator issue.
As for the code part, I added this for the SideMenuController. Note; I am using Storyboards:
import SideMenuController
class CustomSideMenuController: SideMenuController {
required init?(coder aDecoder: NSCoder) {
SideMenuController.preferences.drawing.menuButtonImage = UIImage(named: "menu")
SideMenuController.preferences.drawing.sidePanelPosition = .overCenterPanelLeft
SideMenuController.preferences.drawing.sidePanelWidth = 300
SideMenuController.preferences.drawing.centerPanelShadow = true
SideMenuController.preferences.animating.statusBarBehaviour = .showUnderlay
SideMenuController.preferences.animating.hideDuration = 0.3
super.init(coder: aDecoder)
}
override func viewDidLoad() {
super.viewDidLoad()
performSegue(withIdentifier: "showCenterControllerAlgemeen", sender: nil)
performSegue(withIdentifier: "containSideMenu", sender: nil)
}
}
Anyone has ideas for this? I also tested this with the example project and there it is also noticeable.
Thanks in advance :)
Bump
I'm having the same issue and identified it down to this in UKKitExtension.swift line 46 the button is being created with the wrong dimensions 40px x 40px Apple recommend that it should be 22px x 22px.
let button = UIButton(frame: CGRect(x: 0, y: 0, width: 40, height: 40))
Changing these values to 22px the hamburger sits in the right spot.
I might create a pull request if that helps?
Just created this pull request. #135