Mike Simz
Mike Simz

Reputation: 4026

Handle video player orientation change like YouTube app

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.

enter image description hereenter image description here

Upvotes: 1

Views: 734

Answers (1)

Martin Le
Martin Le

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

Related Questions