[iOS] Fixed clear button tint in text field in search

https://jira.mail.ru/browse/MAPSME-13181
This commit is contained in:
Alexander Boriskov 2020-02-20 12:13:18 +03:00 committed by Aleksandr Zatsepin
parent dedae628fd
commit 03d2b46701
5 changed files with 38 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 573 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 890 B

View file

@ -0,0 +1,26 @@
{
"images" : [
{
"idiom" : "universal",
"filename" : "Clear.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "Clear@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "Clear@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
},
"properties" : {
"template-rendering-intent" : "template"
}
}

View file

@ -43,6 +43,18 @@ NSTimeInterval constexpr kOnSearchCompletedDelay = 0.2;
NSForegroundColorAttributeName: self.tintColor}];
}
-(void)layoutSubviews
{
[super layoutSubviews];
for (UIView* view in self.subviews) {
if ([view isKindOfClass:[UIButton class]]) {
UIButton* button = (UIButton*) view;
[button setImage:[UIImage imageNamed:@"ic_search_clear_14"] forState:UIControlStateNormal];
button.tintColor = self.tintColor;
}
}
}
#pragma mark - Properties
- (void)setIsSearching:(BOOL)isSearching