uinavigationbar

Search Controller in navigation item show black bar

雨燕双飞 提交于 2021-02-08 03:01:46
问题 Hi I have setup search controller using 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 } Everything was working fine until I add this code UINavigationBar.appearance().isOpaque = true

barTintColor not applied when NavigationBar is Large Titles

青春壹個敷衍的年華 提交于 2021-02-07 09:58:01
问题 I'm updating an app that was compiled on Xcode 10 and running fine up through iOS 13. I wanted to make some changes so recompiled on Xcode 11 and now have a problem with the barTintColor. If 'Large Titles' is set to 'Always' my custom barTintColor is not applied -- I just get the default gray. If 'Large Titles' is set to 'Never', my custom barTintColor is applied as expected. If 'Large Titles' is set to 'Automatic', the NavBar is default gray when Large Titles are shown and my custom color

barTintColor not applied when NavigationBar is Large Titles

烈酒焚心 提交于 2021-02-07 09:56:54
问题 I'm updating an app that was compiled on Xcode 10 and running fine up through iOS 13. I wanted to make some changes so recompiled on Xcode 11 and now have a problem with the barTintColor. If 'Large Titles' is set to 'Always' my custom barTintColor is not applied -- I just get the default gray. If 'Large Titles' is set to 'Never', my custom barTintColor is applied as expected. If 'Large Titles' is set to 'Automatic', the NavBar is default gray when Large Titles are shown and my custom color

UINavigationBar with Large Titles - how to find extra height in iOS 11

巧了我就是萌 提交于 2021-02-07 06:07:04
问题 When using prefersLargeTitles for a UINavigationController 's UINavigationBar in iOS 11 , the nav bar increases height. The increase is from 44 to 96 on the iPhones I have checked, but I think those numbers can change per device (or at least we need to code as if they can). I want to programmatically find the 'extra' height - the height of the large titles area that is added beneath the traditional UINavigationBar when a large title is displayed. I can easily find the entire height of the bar

UINavigationBar with Large Titles - how to find extra height in iOS 11

无人久伴 提交于 2021-02-07 06:05:56
问题 When using prefersLargeTitles for a UINavigationController 's UINavigationBar in iOS 11 , the nav bar increases height. The increase is from 44 to 96 on the iPhones I have checked, but I think those numbers can change per device (or at least we need to code as if they can). I want to programmatically find the 'extra' height - the height of the large titles area that is added beneath the traditional UINavigationBar when a large title is displayed. I can easily find the entire height of the bar

How to make flutter app draw behind android navigation bar and make navigation bar fully transparent?

故事扮演 提交于 2021-02-05 19:14:07
问题 I would like to make my Flutter app take up the entire screen in Android while still showing both the status bar and the navigation bar, with both of them transparent, to achieve the full screen look like in iOS. The status bar color can be easily changed, but right now I'm facing problems with getting the app to fill up the screen and making the navigation bar transparent at the same time. By default, the app is not drawn below the navigation bar at all (I've set the status bar color to be

How to make flutter app draw behind android navigation bar and make navigation bar fully transparent?

只谈情不闲聊 提交于 2021-02-05 19:07:18
问题 I would like to make my Flutter app take up the entire screen in Android while still showing both the status bar and the navigation bar, with both of them transparent, to achieve the full screen look like in iOS. The status bar color can be easily changed, but right now I'm facing problems with getting the app to fill up the screen and making the navigation bar transparent at the same time. By default, the app is not drawn below the navigation bar at all (I've set the status bar color to be

SwiftUI - Navigation bar colour change not being applied to status bar

时光毁灭记忆、已成空白 提交于 2021-01-28 11:57:47
问题 I have the following: var body: some View { NavigationView { VStack { Text("Hello") }.navigationBarTitle("Edit Profile", displayMode: .inline) .background(NavigationConfiguration { nc in nc.navigationBar.barTintColor = .red nc.navigationBar.titleTextAttributes = [.foregroundColor: UIColor.black] }) }.navigationViewStyle(StackNavigationViewStyle()) } For the configuration of the nav bar i have: struct NavigationConfiguration: UIViewControllerRepresentable { var configuration:

Adding custom view into NavigationBar not working?

六月ゝ 毕业季﹏ 提交于 2021-01-07 01:16:29
问题 I am trying to add custom view to NavigationBar and result not working correct. public let statusBarHeight: CGFloat = { var heightToReturn: CGFloat = 0.0 for window in UIApplication.shared.windows { if let height = window.windowScene?.statusBarManager?.statusBarFrame.height, height > heightToReturn { heightToReturn = height } } return heightToReturn }() override func viewDidLoad() { super.viewDidLoad() // self.navigationController?.navigationBar.isHidden = true // Do any additional setup

Change color and back button title of Navigation Bar from Swift 3 code

浪尽此生 提交于 2020-12-12 11:48:12
问题 Making UI of my app using code only. Can't find how customize couple elements: 1. Button 'Back' now it looks like: and it should looks like: So, how I can get rid of 'Back' text from button title, keeping '<' system icon there? And how I can change colors of back button and title of navigation bar? 回答1: try self.navigationController?.navigationBar.tintColor = UIColor.white 回答2: Try: override func viewDidLoad(){ //any other initial stuffs //for the bar navigationController?.navigationBar