Don't set reactViewController view frame to whole screen (#1931)
this fixes the case on any time you have a react view that displays the video, but it's being rendered with controls but not as a full screen (ie. easily reproducible when you have a tabbar for instance - the reactViewController.view frame shouldnt be the whole screen bounds).
This commit is contained in:
@@ -708,10 +708,10 @@ static int const RCTVideoUnset = -1;
|
||||
if (!CGRectEqualToRect(oldRect, newRect)) {
|
||||
if (CGRectEqualToRect(newRect, [UIScreen mainScreen].bounds)) {
|
||||
NSLog(@"in fullscreen");
|
||||
} else NSLog(@"not fullscreen");
|
||||
|
||||
[self.reactViewController.view setFrame:[UIScreen mainScreen].bounds];
|
||||
[self.reactViewController.view setNeedsLayout];
|
||||
[self.reactViewController.view setFrame:[UIScreen mainScreen].bounds];
|
||||
[self.reactViewController.view setNeedsLayout];
|
||||
} else NSLog(@"not fullscreen");
|
||||
}
|
||||
|
||||
return;
|
||||
|
Reference in New Issue
Block a user