Mam UISearchBar
dodany do początku UITableView
.UISearchBar minimal style ma przezroczyste tło
// init search bar
self.resultSearchController = ({
let controller = UISearchController(searchResultsController: nil)
controller.searchResultsUpdater = self
controller.dimsBackgroundDuringPresentation = false
controller.searchBar.sizeToFit()
controller.searchBar.tintColor = Config.grayColor()
controller.searchBar.searchBarStyle = UISearchBarStyle.Minimal
self.tableView.tableHeaderView = controller.searchBar
// set content offset for table view in order
// that the searchbar is hidden at the beginning
self.tableView.contentOffset = CGPoint(x: 0, y: controller.searchBar.frame.size.height)
return controller
})()
Zasadniczo wygląda spodziewanych:
Ale kiedy wchodzi pole tekstowe wyszukiwarki i przewinąć w dół tabeli zobaczyć to wygląda dziwnie. Tło kontrolera wyszukiwania jest przezroczyste.
Próbowałem ustawić barTintColor
i backgroundColor
ale to nie ma żadnego wpływu.
Wszelkie aktualizacje w tej sprawie? – Airuop