dekatotoro / SlideMenuControllerSwift

iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift.
MIT License
3.4k stars 754 forks source link

LeftPanGesture will not work after rotate. Use init(mainViewController: UIViewController, leftMenuViewController: UIViewController) #144

Closed Leoshu closed 8 years ago

Leoshu commented 8 years ago

If SlideMenuController.init(mainViewController: UIViewController, leftMenuViewController: UIViewController), after device rotate ,the method that isRightOpen() always be true. So, handleLeftPanGesture(panGesture: UIPanGestureRecognizer) will not work correctly.

My workaround:

  1. SlideMenuOptions.rightPanFromBezel = false
  2. Use SlideMenuController.init(mainViewController: UIViewController, leftMenuViewController: UIViewController, rightMenuViewController: UIViewController). The rightMenuViewController just set UIViewController().
Pluto-Y commented 8 years ago

@Leoshu What version do you use now?

Leoshu commented 8 years ago

pod 'SlideMenuControllerSwift', :git => 'https://github.com/dekatotoro/SlideMenuControllerSwift.git', :branch => 'swift2.1'

maybe it is "version up 2.0.4"

Excuse me. where can I find the version info.

Pluto-Y commented 8 years ago

Maybe you can update to the master version? Can you update the swift version?

Leoshu commented 8 years ago

I develop in swift 2.1. Should I still use master branch?

Pluto-Y commented 8 years ago

No, the master has support to the newest swift version.

Leoshu commented 8 years ago

OK. thanks. Let me try it.

Leoshu commented 8 years ago

It works pretty good at version SlideMenuControllerSwift 2.1.1. Thanks a lot.

Pluto-Y commented 8 years ago

Have you fixed the bug?