Skip to content

Commit

Permalink
Fix Endless Loop for Tint Color Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
PSchmiedmayer committed Mar 15, 2024
1 parent 64512d0 commit f1a775f
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions ResearchKit/Common/ORKCheckmarkView.m
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,14 @@ + (UIImage *)checkedImageWithoutCircle {
- (void)updateCheckView {
if (_checked) {
self.image = _checkedImage;
// FIXME: Need to be replaced.
if (@available(iOS 13.0, *)) {
if (![self.tintColor isEqual: ORKViewTintColor(self)]) {
self.tintColor = ORKViewTintColor(self);
} else {
self.backgroundColor = [self tintColor];
self.tintColor = UIColor.whiteColor;
}
}
else {
self.image = _uncheckedImage;
if (@available(iOS 13.0, *)) {
if (![self.tintColor isEqual: [UIColor systemGray3Color]]) {
self.tintColor = [UIColor systemGray3Color];
} else {
self.tintColor = nil;
self.image = nil;
self.backgroundColor = UIColor.clearColor;
}
}
}
Expand Down

0 comments on commit f1a775f

Please sign in to comment.