File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,7 +258,11 @@ - (void)tintColorDidChange {
258258- (void )traitCollectionDidChange : (UITraitCollection *)previousTraitCollection {
259259 [super traitCollectionDidChange: previousTraitCollection];
260260 [self setNeedsLayout ];
261- [self _updateTappedTintColorForTintColor ];
261+ if (@available (iOS 13.0 , *)) {
262+ if ([previousTraitCollection hasDifferentColorAppearanceComparedToTraitCollection: self .traitCollection]) {
263+ [self _updateTappedTintColorForTintColor ];
264+ }
265+ }
262266}
263267
264268#pragma mark - View Layout -
@@ -657,7 +661,6 @@ - (void)_updateTappedTintColorForTintColor TOROUNDEDBUTTON_OBJC_DIRECT {
657661 if (@available (iOS 13.0 , *)) {
658662 tintColor = [tintColor resolvedColorWithTraitCollection: self .traitCollection];
659663 }
660-
661664 _tappedTintColor = [self _brightnessAdjustedColorWithColor: tintColor
662665 amount: _tappedTintColorBrightnessOffset];
663666}
You can’t perform that action at this time.
0 commit comments