Problems with horizontal orientation
Opened this issue · 1 comments
Hi! Great library! I've found a bug, though: if you present the configured KZSideDrawerController when the phone is in horizontal orientation, the leftViewController gets cut off when you rotate the phone back to vertical orientation and show the left view again.
Steps to reproduce:
- Rotate your device to landscape orientation.
- Present KZSideDrawerController, configured with center and left view controllers.
- Rotate the device to portrait orientation.
- Present left view controller.
Result:
Left view controller won't stretch from top to bottom but will "remember" height from landscape mode.
Should be:
Left view controller should stretch from top to bottom of the KZSideDrawerController.
Tried solutions:
override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
// centerView -- setting this WORKS
var centerFrame = self.centerViewController!.view.frame
centerFrame.size = size
self.centerViewController!.view.frame = centerFrame
// leftView -- setting this DOESN'T WORK
var leftFrame = self.leftViewController!.view.frame
leftFrame.size.width = min(size.width, size.height)
leftFrame.size.height = max(size.width, size.height)
self.leftViewController!.view.frame = leftFrame
}
Do you have any idea how to fix this?
Hi, thanks for having interest in this library and reporting this issue.
Unfortunately so far I could not reproduce the issue. Could you please provide a minimal example code reproducing this issue?