mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-30 00:02:47 +00:00
Merge branch 'fix_searchbar_shadow' into 'rebranding'
Remove top and bottom shadow when UISearchBar is added in UITableView See merge request new-vector/element/element-ios!10
This commit is contained in:
commit
bac171fec1
2 changed files with 14 additions and 12 deletions
|
@ -96,18 +96,19 @@ class DarkTheme: NSObject, Theme {
|
|||
}
|
||||
|
||||
func applyStyle(onSearchBar searchBar: UISearchBar) {
|
||||
searchBar.barStyle = .default
|
||||
searchBar.searchBarStyle = .default
|
||||
searchBar.barStyle = .black
|
||||
searchBar.barTintColor = self.baseColor
|
||||
searchBar.isTranslucent = false
|
||||
searchBar.backgroundImage = UIImage() // Remove top and bottom shadow
|
||||
searchBar.tintColor = self.tintColor
|
||||
|
||||
if #available(iOS 13.0, *) {
|
||||
searchBar.searchTextField.backgroundColor = self.searchBackgroundColor
|
||||
searchBar.searchTextField.textColor = self.searchPlaceholderColor
|
||||
searchBar.tintColor = self.tintColor
|
||||
} else {
|
||||
searchBar.tintColor = self.searchPlaceholderColor
|
||||
|
||||
if let searchBarTextField = searchBar.vc_searchTextField {
|
||||
searchBarTextField.textColor = searchBar.tintColor
|
||||
searchBarTextField.textColor = self.searchPlaceholderColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -104,18 +104,19 @@ class DefaultTheme: NSObject, Theme {
|
|||
}
|
||||
|
||||
func applyStyle(onSearchBar searchBar: UISearchBar) {
|
||||
searchBar.barStyle = .default
|
||||
searchBar.searchBarStyle = .default
|
||||
searchBar.barStyle = .black
|
||||
searchBar.barTintColor = self.baseColor
|
||||
searchBar.isTranslucent = false
|
||||
searchBar.backgroundImage = UIImage() // Remove top and bottom shadow
|
||||
searchBar.tintColor = self.tintColor
|
||||
|
||||
if #available(iOS 13.0, *) {
|
||||
searchBar.searchTextField.backgroundColor = self.searchBackgroundColor
|
||||
searchBar.searchTextField.textColor = self.searchPlaceholderColor
|
||||
searchBar.tintColor = self.tintColor
|
||||
} else {
|
||||
searchBar.tintColor = self.searchPlaceholderColor
|
||||
|
||||
if let searchBarTextField = searchBar.vc_searchTextField {
|
||||
searchBarTextField.textColor = searchBar.tintColor
|
||||
searchBarTextField.textColor = self.searchPlaceholderColor
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue