force UIViewController to be in Landscape mode iOS7

前端 未结 2 834
孤独总比滥情好
孤独总比滥情好 2020-12-21 07:16

I\'ve implemented the proper functions, but they don\'t get triggered? I\'ve tried several solutions here on StackOverFlow, but none of them work. I\'ve tried adding the vie

2条回答
  •  猫巷女王i
    2020-12-21 07:58

    If you are pushing a view controller to a stack of other view controllers in a navigation controller, requiring landscape only will not work well. You should display the landscape-constraint view controller modally.

    See my answer here for an example project: https://stackoverflow.com/a/16022631/983912

提交回复
热议问题