Rotate view controller - ios

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:
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:

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

Related

Awkward Landscape keyboard in portrait mode, IOS 8

I have a portrait app that have Built-In UIViewController (portrait only) with the UIWebView that opens youtube video. Upon video playback user can rotate to landscape mode. After returning from video app correctly rotates to portrait but if user starts text editing - an awkward keyboard appears. I've tried adding landscape support to all screens - it doesn't solve the problem.
Simple steps are:
UIViewController (portrait only)
push UIVIewController (portrait
only) with UIWebView (youtube video)
start video playback, go fullscreen, rotate landscape
press Done go back to first UIViewController
activate textField
In swift:
UIDevice.currentDevice().setValue(1, forKey: "orientation")
UIViewController.attemptRotationToDeviceOrientation()
By using this block in view will appear you solve this issue.

iOS Orientation adapts to unapproved device orientation after Camera dismissed

I am currently writing an iOS app in which have the acceptable device orientations set to Landscape Right and Landscape Left, and in all of my view controllers, I’m returning only those two in the supportedInterfaceOrientations method.
However, if the user uses the in-app camera functionality (which is implemented via UIImagePickerController presented modally in full screen) and rotates the device to Portrait orientation to take a picture, the camera rotates to portrait mode (which is fine), and if the user clicks "Use Photo", when the modal view is dismissed, the view from which the camera was launched is somehow now in portrait mode (which is not fine).
After the camera view has been dismissed, the view controller from which it was launched has UIDeviceOrientationIsPortrait set to true. I am wondering how it ended up in this orientation, and how when a picture is taken, I can ensure that the presenting view controller remains in a landscape orientation. Any help is greatly appreciated!
I am currently writing an iOS app in which have the acceptable device
orientations set to Landscape Right and Landscape Left, and in all of
my view controllers, I’m returning only those two in the
supportedInterfaceOrientations method.
In iOS 6 and later, your app supports the interface orientations defined in your app’s Info.plist file
Have you tried setting it here? Then see if the problem still occurs.
Also, if this doesn't work, try setting the supportedInterfaceOrientations values in the viewWillAppear method of the ViewController that launched UIImagePicker?

UIImagePickerController landscape wrong orientation

I have a problem with UIImagePickerController on my iPad. it is presented as a modalView (presentViewController:).
All orientations are allowed and should work.
If I push a ViewController in Portrait mode on this VC (this is the main view of the App), go back to the Springboard, rotate the iPad to Landscape mode, reopen my App, There is a big black space on the screen.
However, the camera controls are well shown.
Has anyone already seen this kind of bug?
Thank you.
This is better with a screenshot

how to use html5 video landscape in ios

I use phonegap to create a ios project.I want to use htmlt5 video to play a video in landscape.
So there is a way from webkit or in my application to switch in landscape mode only when i showing a HTML5 video?
Thanks!
Create view and add webView as subview to that view. Set orientation of that view to LandscapeLeft and LandScapeRight and load HTML5 video on webview. call that view when ever you want to play video; view will always appear in landscape mode.

play video landscape Iphone sdk 3.2 4.0 with standard api

how to play video landscape with standard api?
video play only portrait !!!
change the app orientation landscape is not useful, because video start portrait forever.
i have a portrait app with a button, when pressed video must play landscape.
yourmoviecontrollername setOrientation:UIDeviceOrientationPortrait animated:NO];
is not allowed by Apple
Maybe the regular videoplayercontroller doesnt do landscape by itself...i would suggest using MPMoviePlayerViewController available in 3.2, you set it up and use view controllers presentMoviePlayerController method in order to display, should work fine for you. here is a ref MPViewcontroller

Resources