Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 3    Views: 92

chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
03/28/13 09:53 PM (12 years ago)

problems with setting navigation bar color

While working on a custom plugin for someone, I noticed an issue with iOS and setting the navigator bar color. If you set the navigation bar color on a screen that is at least 2 screens from the 'home' screen, it creates a problem when going back. To see what I mean, try the following: Create an app with 3 menu simple screens, each one linked to another. Set a color for the navigation bar on the first screen, but not on the next two. Then run the app. If your experience is like mine, you'll notice that the color is set properly on the first screen, then is changed to the default (blue) color when going to the 2nd and 3rd screens. When going back, it stays the default blue when going from screen 3 to 2 (as expected), but also stays default blue when going from 2 to 1. Thus, the navigation bar color originally set has been lost. This seems to be due to the fact that the navigation bar and back button is set set when viewController is loaded, which is based on the current screen data. This data gets pushed forward once, but not more than once. So going back once is okay, but more than once is not. Has anyone else experienced this?
 
nadthevlad
Code is Art
Profile
Posts: 1025
Reg: Jun 07, 2012
Denver
21,850
like
03/28/13 09:58 PM (12 years ago)
What happens if a custom color is set on all three screens? I have noticed how finicky the navbar can be using the mgoblue hack for using an image on the navbar. You set that image once and that is how it stays.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
03/28/13 10:04 PM (12 years ago)
Same problem if a different color is set on all three - it changes going forward every time, but going back it only changes back with the first back-button press.
 
Antonios
Apple Fan
Profile
Posts: 381
Reg: Feb 12, 2013
Korinthos, Gree...
4,610
like
03/29/13 12:18 PM (12 years ago)
have noticed the same…any solutions?
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.