滚动或直到按下搜索栏时导航栏下方的白线

问题描述 投票:3回答:2

正如您在视频中看到的那样,当我开始滚动时,导航栏下方会出现一条白色细线。

只有当我按下searchBar(由我的searchController包含,因此搜索栏不会从Storyboard中添加)时,它才会消失。我尝试了很多不同的组合,试图让它消失,但没有任何效果。

任何帮助表示赞赏!谢谢!

视频:https://www.youtube.com/watch?v=KcgZmBg1VS0

这是我的viewDidLoad里面的代码:

searchController.searchBar.delegate = self

searchController.dimsBackgroundDuringPresentation = false
searchController.hidesNavigationBarDuringPresentation = false
searchController.searchBar.placeholder = "Search for a recipe"

searchController.searchBar.barTintColor = navigationController?.navigationBar.barTintColor
searchController.searchBar.tintColor = UIColor.white
swift uitableview uinavigationcontroller uinavigationbar uisearchbar
2个回答
© www.soinside.com 2019 - 2024. All rights reserved.