Skip to content

Commit

Permalink
解决iOS15转屏的bug
Browse files Browse the repository at this point in the history
  • Loading branch information
renzifeng committed Sep 20, 2022
1 parent 3ed7c08 commit eda356d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions ZFPlayer/Classes/Core/ZFLandscapeRotationManager_iOS15.m
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ - (BOOL)ls_shouldAutorotate {

- (void)rotationFullscreenViewController:(ZFLandscapeViewController *)viewController viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
UIInterfaceOrientation toOrientation = (UIInterfaceOrientation)[UIDevice currentDevice].orientation;
self.currentOrientation = toOrientation;
UIView *playerSuperview = self.landscapeViewController.playerSuperview;
if (UIInterfaceOrientationIsLandscape(toOrientation) && self.contentView.superview != playerSuperview) {
CGRect targetRect = [self.containerView convertRect:self.containerView.bounds toView:self.containerView.window];
Expand Down

0 comments on commit eda356d

Please sign in to comment.