Support different orientation for only one view iOS 6

后端 未结 7 1061
时光说笑
时光说笑 2020-11-29 03:57

I want to rotate ONLY one of my views within my app to either landscape left or landscape right. All my other views are in portrait mode and I have set my app to support onl

7条回答
  •  青春惊慌失措
    2020-11-29 04:49

    Follow the below steps

    • Create subclass of UINavigationController overriding the rotating methods.
    • In AppDelegate, create a BOOL islandscape property.
    • When a view is pushed/poped/present/dismiss, adjust this BOOL value.

    Sample Project

    I created a sample project for this which is working perfectly. Download and integrate in your project: https://www.dropbox.com/s/nl1wicbx52veq41/RotationDmeo.zip?dl=0

提交回复
热议问题