Questions tagged [uinavigationbarappearance]
47 questions
0
votes
1 answer
How can I customize the color of the navigation bar and status bar and the title of the viewController at the same time?
I'm a beginner in swift and I'm trying to change the background color of the navigation to red at the same time as the background color of the status bar
Meanwhile, I have a viewController. I want to change the title of the navigation above to my…

yude
- 5
- 3
0
votes
1 answer
Change NavBarTitle on SystemColor change
Good day everyone,
I was trying to change the titleTextAttributes of the UINavigationBar.appearance() depending on the actual SystemColor (.dark, .light)
First of all I used an initializer to change the .foregroundColor, everything works…

Marcii
- 39
- 6
0
votes
1 answer
searchController searchBar text color change in modal presented ViewController
have the following setup a root TabBarController the second index have a navigation bar that holds a viewController, for clarity call viewController A, a have a button to modal present a view controller with have a tableview, this tableview has as…

Yoel Jimenez del valle
- 1,270
- 1
- 9
- 20
0
votes
1 answer
Using UIBarButtonItemAppearance have both the system and the custom back button images
I am using UIBarButtonItemAppearance for the first time and I'm confused on how to put a custom image for the back button.
This is how I do it:
private func createBarButtonAppearence(_ color: UIColor, textColor: UIColor) ->…

Joan Cardona
- 3,463
- 2
- 25
- 43
0
votes
0 answers
Navigation bar color ios15
I have problem with changing navigation bar color in iOS 15.
In AppDelegate I'm setting UINavigationBarAppearence like this:
let appearance = UINavigationBarAppearance()
appearance.configureWithOpaqueBackground()
appearance.shadowImage =…

user9417995
- 31
- 2
0
votes
1 answer
Making status bar opaque on iOS >= 15
So, as from iOS 15, its updated how navigation bar looks. If there is no content behind it (eg. we didn't scroll up), it will be transparent. Now this affects status bar as well.
When I hide navigation bar, status bar stays transparent. If I do this…

Whirlwind
- 14,286
- 11
- 68
- 157
0
votes
1 answer
Changing the back button of UINavigaitonBar with MVVM+C
I am using MVVM+C pattern to build my app. Currently I am facing a problem with changing the native back button title and image of navigation bar to the custom image without the title. I've tried a lots of solutions what I was able to find, but…

Peter Hlavatík
- 117
- 1
- 1
- 11
0
votes
1 answer
Why the view.safeAreaInset is same for Opaque and Transparent UINavigationBarAppearance?
When we use the old way of making the navigation bar translucent or opaque using isTranslucent property on the navigation bar, the view's safeAreaInset returns some value other than 0 for the translucent navigation bar and viceVersa.
But this…

the monk
- 389
- 4
- 14
0
votes
0 answers
SwiftUI UINavigationBar does not ignore the top safe area. How to get rid of empty space on the top?
Code I used to create an example of this navigation bar:
struct ContentView: View {
init() {
let defaultAppearance = UINavigationBarAppearance()
defaultAppearance.configureWithOpaqueBackground()
…

netsplatter
- 559
- 3
- 14
0
votes
1 answer
Set navigation bar separator color for screen transition in Swift (iOS 13/14)?
I have 2 screens with a common navigation controller and common navigation bar. The first screen should have no separator, the second one should have a separator of a custom color.
Code I tried:
1)
navigationController?.navigationBar.shadowImage =…

Vyachaslav Gerchicov
- 2,317
- 3
- 23
- 49
0
votes
2 answers
Change Navigation bar title index colour with Color Set in Assets
I have to change the last 5 letters of the navigation bar title to be as a color inside my assets.
struct MainView: View {
var body: some View {
NavigationView {
Text("Hello, World!")
…

xmetal
- 681
- 6
- 16
0
votes
1 answer
How to resize UINavigationBarAppearance background image
I am trying to add a background image to my nav bar using the UINavigationBarAppearance. However, the imageView size is bigger than the navigation bar content view.. How do I fix this?
Result: Notice the imageview overlaps with the…

Mocha
- 2,035
- 12
- 29
0
votes
1 answer
UIImagePickerController in iOS 13: Did apple abandon navigation bar customizability?
In iOS 13 some things seem to have changed in terms of customizing the navigation bar appearance. I want to customize the navigation bar of a UIImagePickerController. According to iOS 13 guidelines the code to change an existing navigation bar (in…

Wizard
- 295
- 1
- 4
- 15
0
votes
1 answer
Buttons replacing navigation bar items
I want to get two buttons under status bar:
First, I hided navigationBar:
navigationController?.setNavigationBarHidden(true, animated: false)
and made 2 buttons on the place of NavigationBar. It worked on simulator, but on real device (iPhone 6)…

Dima
- 1,189
- 1
- 8
- 12
0
votes
0 answers
Navigation bar height decreased when push ios13
When i move to view controller after making navigationbar.ishidden = false the navbar height decreases and there is a black space between navbar and uiview
And when i move down the notification screen navbar height increase
Code
viewController =…

nischal
- 1
- 1