您好,我使用
设置了搜索控制器private func setupSearchbar() {
searchController = UISearchController(searchResultsController: nil)
searchController.searchResultsUpdater = self
searchController.obscuresBackgroundDuringPresentation = false
searchController.searchBar.placeholder = "Search Contacts"
self.navigationItem.searchController = searchController
self.definesPresentationContext = true
}
一切正常,直到我添加这段代码
UINavigationBar.appearance().isOpaque = true
UINavigationBar.appearance().isTranslucent = false
UINavigationBar.appearance().barTintColor = UIColor(named: "PrimaryDark")
UINavigationBar.appearance().tintColor = UIColor.white
UINavigationBar.appearance().titleTextAttributes = [NSAttributedString.Key.font:Constants.AppTheme.Fonts.font(type: .FONT_BOLD, size: 22) ,NSAttributedString.Key.foregroundColor:UIColor.white]
UINavigationBar.appearance().largeTitleTextAttributes = [NSAttributedString.Key.font:Constants.AppTheme.Fonts.font(type: .FONT_BOLD, size: 34) ,NSAttributedString.Key.foregroundColor:UIColor.white]
现在,当我点击搜索栏时,会出现大的底部黑条
该如何解决?
查看调试
答案 0 :(得分:0)
删除此
$ ./bin/number_evens_odds
enter the amount of numbers: 10
enter number 1: 21
enter number 2: 22
enter number 3: 23
enter number 4: 24
enter number 5: 119
enter number 6: 121
enter number 7: 131
enter number 8: 140
enter number 9: 141
enter number 10: 143
numbers
--------
21
22
23
24
119
121
131
140
141
143
evens
--------
22
24
140
odds
--------
21
23
119
121
131
141
143
numbers even odd
-------- -------- --------
21 22 21
22 24 23
23 140 119
24 121
119 131
121 141
131 143
140
141
143
答案 1 :(得分:0)