iOS13 如何结合 SearchController 更改 NavController 的 Backbutton-tintColor
How to change NavController's Backbutton-tintColor in Combination with SearchController in iOS13
至于 iOS13.0 和 iOS13.1,我可以看到使用 SearchController 时的行为差异:
-> 在 iOS12.x 中,BackButton 是正确的黄色
-> 在 iOS13.0 中,BackButton 是正确的黄色
-> 在 iOS13.1 中,BackButton 错误(默认为蓝色)
如果用户键入几个搜索字母然后按取消,后退按钮会变成错误的颜色。
此外,我将颜色设置如下(..不适用于 iOS13.1):
navigationItem.searchController?.searchBar.barStyle = .black
navigationItem.searchController?.searchBar.keyboardAppearance = .dark
navigationItem.searchController?.searchBar.tintColor = .yellow
navigationItem.searchController?.searchBar.barTintColor = .yellow
我也遇到过这个确切的问题,它已在 iOS 13.2
上修复
至于 iOS13.0 和 iOS13.1,我可以看到使用 SearchController 时的行为差异:
-> 在 iOS12.x 中,BackButton 是正确的黄色
-> 在 iOS13.0 中,BackButton 是正确的黄色
-> 在 iOS13.1 中,BackButton 错误(默认为蓝色)
如果用户键入几个搜索字母然后按取消,后退按钮会变成错误的颜色。
此外,我将颜色设置如下(..不适用于 iOS13.1):
navigationItem.searchController?.searchBar.barStyle = .black
navigationItem.searchController?.searchBar.keyboardAppearance = .dark
navigationItem.searchController?.searchBar.tintColor = .yellow
navigationItem.searchController?.searchBar.barTintColor = .yellow
我也遇到过这个确切的问题,它已在 iOS 13.2
上修复