Simulated Metrics for View Controllers

I had a trouble with navigation controllers. Child view controllers were programmatically pushed, and I did not know how to get customized navigation bars. I first attached navigation controllers to those child view controllers and it seemed to work. Then, I got warning messages saying that the navigation controllers was not unreachable. It is only warnings but I decided to dig about what I do not know.

The first thing I tried was to delete those navigation controllers from the storyboard. Surprisingly, it still worked as expected. The items on the customized navigation bars were still there. In fact, they belonged to view controllers, not navigation controllers. According to Apple, it should be possible to have customized navigation bars. Usually, something that can be programmatically set may be done with the interface builder. Then, I found that Simulated Metrics in the Attribute Inspector allows one to show and hide navigation bars in the interface builder. After some tries, I ended up the setting Translucent Navigation Bar for the Top Bar entry of the Simulated Metrics.

Screen Shot 2018-03-04 at 8.37.06 PM.png
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s