In my app I want a video to open in landscape mode when the MediaPlayer is being opened, but I don't want to enable landscape in all other ViewControllers. How can I programmatically achieve this using Swift?
Asked
Active
Viewed 102 times
1 Answers
0
You need to declare method viewWillTransitionToSize:withTransitionCoordinator:
in your view controller, and change frame relatively to your needs.
In more detail, you need to read here, at least.

itsji10dra
- 4,603
- 3
- 39
- 59

dimpiax
- 12,093
- 5
- 62
- 45