Skip to content

Commit

Permalink
fix(ios): redraw CGColor when changing trait collection (#13137)
Browse files Browse the repository at this point in the history
Co-authored-by: Joshua Quick <jquick@axway.com>
  • Loading branch information
hansemannn and jquick-axway committed Oct 29, 2021
1 parent 2052f78 commit 1ac97a4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions iphone/TitaniumKit/TitaniumKit/Sources/API/TiUIView.m
Expand Up @@ -331,6 +331,22 @@ - (id)accessibilityElement
return self;
}

- (void)traitCollectionDidChange:(UITraitCollection *)previousTraitCollection
{
[super traitCollectionDidChange:previousTraitCollection];

// Redraw the border- and view shadow color since they're using CGColor references
id borderColor = [self.proxy valueForKey:@"borderColor"];
if (borderColor != nil) {
[self setBorderColor_:borderColor];
}

id viewShadowColor = [self.proxy valueForKey:@"viewShadowColor"];
if (viewShadowColor != nil) {
[self setViewShadowColor_:viewShadowColor];
}
}

#pragma mark - Accessibility API

- (void)setAccessibilityLabel_:(id)accessibilityLabel
Expand Down

0 comments on commit 1ac97a4

Please sign in to comment.