diff --git a/iphone/Maps/Core/Theme/SearchStyleSheet.swift b/iphone/Maps/Core/Theme/SearchStyleSheet.swift index e6f79f3af7..86afd4aeee 100644 --- a/iphone/Maps/Core/Theme/SearchStyleSheet.swift +++ b/iphone/Maps/Core/Theme/SearchStyleSheet.swift @@ -103,5 +103,13 @@ class SearchStyleSheet: IStyleSheet { s.borderColor = colors.blackDividers s.textAlignment = .natural } + + theme.add(styleName: "SearchCellAds", from: "TableCell") { (s) -> (Void) in + s.backgroundColor = colors.bannerBackground + } + + theme.add(styleName: "SearchCellAvaliable", from: "TableCell") { (s) -> (Void) in + s.backgroundColor = colors.transparentGreen + } } } diff --git a/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.mm b/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.mm index 341ef247c2..4fcf80bcad 100644 --- a/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.mm +++ b/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.mm @@ -122,11 +122,11 @@ bool PopularityHasHigherPriority(bool hasPosition, double distanceInMeters) } if (productInfo.m_isLocalAdsCustomer) - self.backgroundColor = [UIColor bannerBackground]; + [self setStyleAndApply: @"SearchCellAds"]; else if (isAvailable) - self.backgroundColor = [UIColor transparentGreen]; + [self setStyleAndApply: @"SearchCellAvaliable"]; else - self.backgroundColor = [UIColor white]; + [self setStyleAndApply: @"Background"]; } - (void)setInfoText:(NSString *)infoText diff --git a/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.xib b/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.xib index d345624e3c..2bb464dcba 100644 --- a/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.xib +++ b/iphone/Maps/UI/Search/TableView/MWMSearchCommonCell.xib @@ -1,6 +1,8 @@ + + @@ -21,7 +23,7 @@ - +