iPad rotation bug when using MPMoviePlayerViewController

前端 未结 2 1124
迷失自我
迷失自我 2021-02-03 11:15

Issue summary

Changing the orientation of an iPad device or simulator while playing a video using MPMoviePlayerViewController results in an inconsistent rotation state

2条回答
  •  粉色の甜心
    2021-02-03 12:03

    This also solves an iPhone/iPodTouch rotation issue that I was struggling with. I am developing a universal app in which each view displays a different image depending on whether the device is in portrait or landscape orientation. Buttons are used to navigate between views.

    If the app is running on the device and a portrait view is rotated to landscape, my image switching takes place. If the device is then placed flat on a table top and the button is tapped to display the next view, the view appears in landscape but shows the portrait image instead. I solved the problem by forcing a portrait view to appear by detecting for face up and down, but Apple's code solved this problem (as well as the similar movie problem I was also experiencing).

    Many thanks for reporting the bug - I assumed it was just my bad coding...

提交回复
热议问题