admin管理员组文章数量:1128712
I have a UITableViewController with a UINavigationBar with the property :
navigationBar.prefersLargeTitles = true
navigationItem.largeTitleDisplayMode = .automatic
I add in the UITableViewController a UISearchController with the easiest way :
private func setupSearchController() {
searchResultsController = SearchResultsController()
searchController = UISearchController(searchResultsController: searchResultsController)
searchController?.searchResultsUpdater = searchResultsController
searchController?.obscuresBackgroundDuringPresentation = true
searchController?.searchBar.tintColor = R.color.primaryText()
navigationItem.searchController = searchController
navigationItem.hidesSearchBarWhenScrolling = false
definesPresentationContext = true
}
If the UITableView is empty the UI looks good, but if I add at least 1 row, the simplest like this :
override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
return UITableViewCell()
}
At launch the Large Title of the UINavigationBar is collapsed. If I scroll down the UITableView I get the Large Title back.
It looks like adding something to the UITableView make it scrolling. How can I prevent the UINavigationBar to be collapsed at launch?
本文标签: iosLarge Title collapsing at launch when UITableView not emptyStack Overflow
版权声明:本文标题:ios - Large Title collapsing at launch when UITableView not empty - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736728866a1949881.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论