Reputation: 643
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)UIVIewController
(portrait
only) with UIWebView
(youtube video)UIViewController
Upvotes: 3
Views: 760
Reputation: 1
In swift:
UIDevice.currentDevice().setValue(1, forKey: "orientation")
UIViewController.attemptRotationToDeviceOrientation()
By using this block in view will appear you solve this issue.
Upvotes: -1