Reputation: 4026
I would like to know the best way to handle the device orientation change while viewing a video like how it works in the YouTube app. In landscape, the video is full screen but when the user rotates to portrait the video is pinned to top of screen and a list of 'recommended' videos are listed below it. How can I achieve this? Any help would be greatly appreciated. Thanks in advance.
Upvotes: 1
Views: 734
Reputation: 719
Youtube only takes care the orientation when rotation of device is unlock.
If you want to do like this, implement this function
(void)willAnimateRotationToInterfaceOrientation(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
to handle when orientation changes.
Upvotes: 0