AVPlayer Rotate View makes screen tapping impossible

I used AVPlayer for movie player in my application. I explained the problem with diagrams.

enter image description here

When I press the "Play" button in the video view mode (portrait mode), then I go to view the details of the film. When I click on the screen, the navigation bar and player panel appear. If you touch the screen again, it will disappear. This is good when the device is in portrait mode.

But I changed my code to landscape mode, when I press the play button, it will automatically switch to landscape mode in the form of watching a movie.

So, the problem here is that when I do this, the listening area is only at the top and cannot touch other places.
This happens when the previous Movie View Controller is in portrait mode and when viewing movie information in landscape mode.

enter image description here

The problem will not be if the first view controller is in Landscape mode and the second . view) is in Landscape mode .

I do not know how to solve this problem. Is the first view control mode possible for the second controller?
Please help me with this? Thanks for reading my long paragraph.

+4

Source: https://habr.com/ru/post/1673666/


All Articles