Uiimagepickercontroller Navigation Bar Tint Color Not Working with iOS 13

UIImagePickerController Navigation Bar Tint Color not working with iOS 13

This was resolved with rmaddy's solution in the comments.

in AppDelegate implement;

func configureGlobalUI() {
UINavigationBar.appearance().tintColor = .red
}

then call in didFinishLaunchingWithOptions

This works as I require the tintColor on all navigationBar appearances.

iOS13 - problem with navigationBar title color

In iOS13 you need to set the title color on the UINavigationBarAppearance object - try adding this line to your code:

appearance.titleTextAttributes = [.foregroundColor: myAppLabelColor]
appearance.largeTitleTextAttributes = [.foregroundColor: myAppLabelColor]

What is the right way to set back button arrow tint in ios 13

The new way of setting the back button color of the appearance (proxy) would be:

let appearance = UINavigationBarAppearance()

// Apply the configuration option of your choice
appearance.configureWithTransparentBackground()

// Create button appearance, with the custom color
let buttonAppearance = UIBarButtonItemAppearance(style: .plain)
buttonAppearance.normal.titleTextAttributes = [.foregroundColor: UIColor.white]

// Apply button appearance
appearance.buttonAppearance = buttonAppearance

// Apply tint to the back arrow "chevron"
UINavigationBar.appearance().tintColor = UIColor.white

// Apply proxy
UINavigationBar.appearance().standardAppearance = appearance

// Perhaps you'd want to set these as well depending on your design:
UINavigationBar.appearance().compactAppearance = appearance
UINavigationBar.appearance().scrollEdgeAppearance = appearance

Incorrect navigation bar colour in limited library picker on iOS 15

The way to get completely control over a navigation bar's color is to use a background image. Make an image renderer. Fill the context with solid red and extract the image from the renderer. Call setBackgroundImage on the appearance proxy.

I don't have time to translate the code from Swift to Objective-C so I leave it up to you:

    let rend = UIGraphicsImageRenderer(size:.init(width:100, height:100))
let im = rend.image {
con in
UIColor.red.setFill()
con.fill(.init(x: 0, y: 0, width: 100, height: 100))
}
UINavigationBar.appearance().setBackgroundImage(im, for: .default)

In iOS13 the status bar background colour is different from the navigation bar in large text mode

No hacks or funkiness required here. The key is defining the desired appearance and setting this value on BOTH the nav bar's standardAppearance AND its scrollEdgeAppearance. I have the following in the init for my base navigation controller subclass for my entire app:

if #available(iOS 13.0, *) {
let navBarAppearance = UINavigationBarAppearance()
navBarAppearance.configureWithOpaqueBackground()
navBarAppearance.titleTextAttributes = [.foregroundColor: UIColor.white]
navBarAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.white]
navBarAppearance.backgroundColor = <insert your color here>
navigationBar.standardAppearance = navBarAppearance
navigationBar.scrollEdgeAppearance = navBarAppearance
}

Sample Image

Tab & Navigation Bar changes after upgrading to XCode 13 (& iOS 15)

About Navigation Bar is black, try do it:

let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.backgroundColor = .red
appearance.titleTextAttributes = [.font:
UIFont.boldSystemFont(ofSize: 20.0),
.foregroundColor: UIColor.white]

// Customizing our navigation bar
navigationController?.navigationBar.tintColor = .white
navigationController?.navigationBar.standardAppearance = appearance
navigationController?.navigationBar.scrollEdgeAppearance = appearance

I wrote a new article talking about it.

https://medium.com/@eduardosanti/uinavigationbar-is-black-on-ios-15-44e7852ea6f7



Related Topics



Leave a reply



Submit