0

I set my app that it should works only in portrait, now I'm showing a youtube video and I think it's better to see this video in landscape mode. I set my app with this flags:

enter image description here

How I can rotate the view when the video is playing? I display the video I'm using the HCYoutubeParser library. Can you help me?

UPDATE storyboard:

enter image description here

lucgian841
  • 1,830
  • 5
  • 34
  • 57

1 Answers1

1

You should check “Portrait”, "Landscape Left" and "Landscape Right" in the Deployment Info. In the video player view controller, you support Portrait and Landscape, in your other view controllers only support Portrait.

You can refer to Autorotate in iOS 6 has strange behaviour and iOS 6 UITabBarController supported orientation with current UINavigation controller

Community
  • 1
  • 1
chancyWu
  • 14,073
  • 11
  • 62
  • 81
  • Thank you for answer. I set the deployment info like what you said, now the video plays in landscape mode. Now how I can make portrait the other view controller? There's a code to do that? – lucgian841 Nov 25 '13 at 14:43
  • @lucgian841 it depends on your whole view controller hierarchy. How about your view controller hierarchy? – chancyWu Nov 25 '13 at 14:45
  • @lucgian841 try shouldAutorotate return NO and supportedInterfaceOrientations return UIInterfaceOrientationMaskPortrait in all other view controllers – chancyWu Nov 25 '13 at 14:55
  • I tried what you say but no effects: the interface rotate... I tried to set portrait in storyboard too... – lucgian841 Nov 25 '13 at 14:59
  • let us [continue this discussion in chat](http://chat.stackoverflow.com/rooms/41883/discussion-between-lucgian841-and-chancy) – lucgian841 Nov 25 '13 at 15:00