[iOS] Fixed visual bugs

https://jira.mail.ru/browse/MAPSME-12818
This commit is contained in:
Alexander Boriskov 2020-01-31 19:52:23 +03:00 committed by Daria Volvenkova
parent 382dffe7db
commit 6a27a50321
2 changed files with 7 additions and 4 deletions

View file

@ -32,7 +32,10 @@ class UISearchBarRenderer: UIViewRenderer {
searchTextField?.backgroundColor = backgroundColor
}
if let barTintColor = style.barTintColor {
control.backgroundImage = barTintColor.getImage()
let position = control.delegate?.position?(for: control) ?? control.barPosition
control.setBackgroundImage(barTintColor.getImage(), for: position, barMetrics: .defaultPrompt)
control.setBackgroundImage(barTintColor.getImage(), for: position, barMetrics: .default)
control.backgroundColor = barTintColor
}
if let tintColor = style.tintColor {
control.tintColor = tintColor

View file

@ -1,10 +1,10 @@
extension UITableView {
@objc override func applyTheme() {
for style in StyleManager.shared.getStyle(styleName)
where !style.isEmpty && !style.hasExclusion(view: self) {
if styleName.isEmpty {
styleName = "TableView"
}
for style in StyleManager.shared.getStyle(styleName) {
for style in StyleManager.shared.getStyle(styleName)
where !style.isEmpty && !style.hasExclusion(view: self) {
UITableViewRenderer.render(self, style: style)
}
}