-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PLAYRTS-5578 - iOS 18 Update #512
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,7 +33,8 @@ @interface TabBarController () | |
@property (nonatomic, readonly) NSLayoutConstraint *playerLeadingConstraint; | ||
@property (nonatomic, readonly) NSLayoutConstraint *playerTrailingConstraint; | ||
@property (nonatomic, readonly) NSLayoutConstraint *playerHeightConstraint; | ||
@property (nonatomic, readonly) NSLayoutConstraint *playerBottomConstraint; | ||
@property (nonatomic, readonly) NSLayoutConstraint *playerBottomToViewConstraint; | ||
@property (nonatomic, readonly) NSLayoutConstraint *playerBottomToSafeAreaConstraint; | ||
|
||
@end | ||
|
||
|
@@ -43,7 +44,8 @@ @implementation TabBarController | |
@synthesize playerLeadingConstraint = _playerLeadingConstraint; | ||
@synthesize playerTrailingConstraint = _playerTrailingConstraint; | ||
@synthesize playerHeightConstraint = _playerHeightConstraint; | ||
@synthesize playerBottomConstraint = _playerBottomConstraint; | ||
@synthesize playerBottomToViewConstraint = _playerBottomToViewConstraint; | ||
@synthesize playerBottomToSafeAreaConstraint = _playerBottomToSafeAreaConstraint; | ||
|
||
#pragma mark Object lifecycle | ||
|
||
|
@@ -124,12 +126,21 @@ - (NSLayoutConstraint *)playerHeightConstraint | |
return _playerHeightConstraint; | ||
} | ||
|
||
- (NSLayoutConstraint *)playerBottomConstraint | ||
- (NSLayoutConstraint *)playerBottomToViewConstraint | ||
{ | ||
if (! _playerBottomConstraint) { | ||
_playerBottomConstraint = [self.miniPlayerView.bottomAnchor constraintEqualToAnchor:self.tabBar.topAnchor]; | ||
if (! _playerBottomToViewConstraint) { | ||
_playerBottomToViewConstraint = [self.miniPlayerView.bottomAnchor constraintEqualToAnchor:self.view.bottomAnchor]; | ||
Comment on lines
+131
to
+132
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
return _playerBottomConstraint; | ||
_playerBottomToViewConstraint.constant = -self.tabBar.bounds.size.height; | ||
return _playerBottomToViewConstraint; | ||
} | ||
|
||
- (NSLayoutConstraint *)playerBottomToSafeAreaConstraint | ||
{ | ||
if (! _playerBottomToSafeAreaConstraint) { | ||
_playerBottomToSafeAreaConstraint = [self.miniPlayerView.bottomAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.bottomAnchor]; | ||
} | ||
return _playerBottomToSafeAreaConstraint; | ||
} | ||
|
||
#pragma mark View lifecycle | ||
|
@@ -400,16 +411,20 @@ - (void)updateLayoutAnimated:(BOOL)animated | |
|
||
if (self.miniPlayerView.active) { | ||
self.playerHeightConstraint.constant = MiniPlayerHeight; | ||
self.playerBottomConstraint.constant = -self.miniPlayerOffset; | ||
self.playerBottomToSafeAreaConstraint.constant = -self.miniPlayerOffset; | ||
} | ||
else { | ||
self.playerHeightConstraint.constant = 0.f; | ||
self.playerBottomConstraint.constant = 0.f; | ||
self.playerBottomToSafeAreaConstraint.constant = 0.f; | ||
} | ||
|
||
self.playerHeightConstraint.active = YES; | ||
self.playerBottomConstraint.active = YES; | ||
|
||
if (self.traitCollection.horizontalSizeClass == UIUserInterfaceSizeClassRegular) { | ||
self.playerBottomToSafeAreaConstraint.active = YES; | ||
} else { | ||
self.playerBottomToViewConstraint.active = YES; | ||
} | ||
Comment on lines
+422
to
+426
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Are the two contraints compatible in the same time as they are link both to |
||
|
||
CALayer *miniPlayerLayer = self.miniPlayerView.layer; | ||
if (UIAccessibilityIsVoiceOverRunning()) { | ||
miniPlayerLayer.cornerRadius = 0.f; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep the same previous offset for iPadOS previous 18 and introduce an os version check?
The new condition should be only for iPadOS 18 and more.
UI change: no more top and right "look like" same margin on the GoogleCast floating button above the heart stage card.