How to set the color of the navigation bar in the file of the iOS 8 launch screen?

I am using a storyboard for my startup screen file. This is a very simple setup:

enter image description here

I want to set an opaque color for the navigation bar ...

In AppDelegate, I can do something like the following:

[[UINavigationBar appearance] setBarTintColor:[UIColor redColor]]; 

But this does not apply to the startup screen file.

How to set color of navigation bar / barTintColor in Interface Builder?

+5
source share
2 answers

The stroke hue is set for the navigation bar in the inspector as shown here .

Just checked it with the HOT PINK navigation bar in my current LaunchScreen.xib project and it works great.

+5
source

@alexcurylo has confirmed that barTintColor can be installed in IB. Part of the problem was that I could not figure out how to select the NavigationBar (I am not a normal user of Interface Builder) ...

Just in case, this helps someone else, I was able to select the Navigation Bar as a child of the Navigation Controller using the Document Outline panel (I could not do this by clicking the left / right visual presentation ...):

enter image description here

After the selection, as @alexcurylo pointed out, it was just a setup in the Attributes Inspector .

+4
source

Source: https://habr.com/ru/post/1213665/


All Articles