aryaxt / iOS-Slide-Menu

iOS Slide Menu with ability to add both left and right menu, and built in gesture recognizer. Similar to Path and Facebook
Other
1.53k stars 359 forks source link

How can I set the menu Orientation portrait only? #169

Closed dhekrazaied closed 9 years ago

dhekrazaied commented 9 years ago

Hi, On ipad even I set orientation to portrait on my app, the menu still rotate. How can I set rotation false?

jcarnerolopez commented 9 years ago

Have the same issue. Any idea of how to solve this?

dhekrazaied commented 9 years ago

In the class slideNavigation.m set any occurrences of uiinterfaceDevice to uiinterfaceDevicePortrait

aryaxt commented 9 years ago

will look into this and add a fix if needed Thanks

jcarnerolopez commented 9 years ago

Thanx dhekrazaied. It worked for me. You have saved me a lot of time. I really appreciate. Best regards.

evgeniyd commented 9 years ago

Hi,

The problem here is that SlideNavigationController rely on device's orientation, rather than interface orientation. So, rather than using

UIDeviceOrientation orientation = [UIDevice currentDevice].orientation;

the controller should use

UIInterfaceOrientation interfaceOrientation = self.interfaceOrientation;

I have implemented the change in my fork.

aryaxt commented 9 years ago

This is fixed in 1.5