Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 19    Views: 1598

mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
03/14/14 08:39 AM (10 years ago)

Change tab bar color transparency

I'm working on my first tabbed app (iOS) and there are 4 tabs. Three are xib files and one is html pro. I want the navbar and toolbar to be white and not translucent. Navbar works great as does tool bar with xib files. But my html file has a colored background and this keeps showing through the tool bar. How do I make it solid? There is an option in the global theme for "bottom tool bar style" yet whether I put solid or translucent there doesn't seem to be any JSON data saved. Josh
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
03/14/14 12:27 PM (10 years ago)
Can you put those values into the custom JSON section?
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/14/14 01:01 PM (10 years ago)
The problem is I'm not sure what the exact JSON definition is that will help. I have already tried the below without success: "toolbarStyle":"solid" Josh
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
03/14/14 02:45 PM (10 years ago)
Do a view source in the browser
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/14/14 03:14 PM (10 years ago)
I did, and the ID for that option is toolbarStyle. Doesn't work.
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
03/14/14 03:33 PM (10 years ago)
can you upload a screenshot of the app
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/14/14 03:39 PM (10 years ago)
Okay, still a work in progress.... but here we go: 1st tab: home screen, tab bar is white. Xib file: https://www.dropbox.com/s/25jxb2bcrkd2fuf/screen1.PNG 4th tab: FAQ, tab bar is translucent so greenish hue. HTML pro plugin https://www.dropbox.com/s/oeguk16w53ggw0a/screen2.PNG
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
03/14/14 03:55 PM (10 years ago)
are u able to set the bar tint barTintColor The tint color to apply to the tab bar background. @property(nonatomic, retain) UIColor *barTintColor Discussion This color is made translucent by default unless you set the translucent property to NO. Availability Available in iOS 7.0 and later. Declared In UITabBar.h or try something from this tutorial http://ios-blog.co.uk/tutorials/ios-custom-ui-series-tabbar-navbar/
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/14/14 04:11 PM (10 years ago)
I don't follow. There is no UITabBar.h file. If I search for "barTintColor" in my project it only appears in the BT_viewController.m file. Where do I sent translucency to no?
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
03/14/14 04:18 PM (10 years ago)
xcode 2.1.9 i think in my 2nd app i had this problem with html pro plugin so i used the custom url plugin and put my mobile site in the dataUrl
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/14/14 04:19 PM (10 years ago)
repeat post
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
03/14/14 04:22 PM (10 years ago)
can you paste what the code is for bartintcolor
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/14/14 04:24 PM (10 years ago)
repeat post
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/14/14 04:26 PM (10 years ago)
///set the nav bar background color... if(iosVer > 6){ [[self.navigationController navigationBar] setBarTintColor:[BT_viewUtilities getNavBarBackgroundColorForScreen:self.screenData]]; //text and icons in the nav bar also need to be set to "title color"... [self.navigationController.navigationBar setTintColor:[BT_color getColorFromHexString:[appDelegate navBarTitleTextColor]]]; }else{ [[self.navigationController navigationBar] setTintColor:[BT_viewUtilities getNavBarBackgroundColorForScreen:self.screenData]]; } //set the nav bar style... if([[BT_strings getStyleValueForScreen:self.screenData nameOfProperty:@"navBarStyle" defaultValue:@""] isEqualToString:@"transparent"]){ [self.navigationController.navigationBar setTranslucent:TRUE]; }else{ [self.navigationController.navigationBar setTranslucent:FALSE]; }
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
03/14/14 04:32 PM (10 years ago)
this is for nav bar , you find similar code but for tabBar
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/14/14 04:37 PM (10 years ago)
If I search my project for bartintcolor that is all that comes up aside for another declaration dealing with SMS messages. But not to worry... I changed from HTML pro to regular HTML plugin and now it works normally. Weird. Thanks for your help!!
 
EdReyes
Lost but trying
Profile
Posts: 574
Reg: Oct 21, 2013
location unknow...
17,640
like
03/14/14 04:38 PM (10 years ago)
yeah had the same issue last november, glad it works now
 
Kittsy
buzztouch Evangelist
Profile
Posts: 2251
Reg: Feb 22, 2012
Liverpool
31,360
like
03/14/14 04:45 PM (10 years ago)
Have the true fix if you like BT_tabBarController.m line 40 method //init -(id)init{ if((self = [super init])){ //[BT_debugger showIt:self message:[NSString stringWithFormat:@"INIT%@", @""]]; // add me but only fire the method if in ios7 if ([self.tabBar respondsToSelector:@selector(setTranslucent:)]) { //this takes off the transparency self.tabBar.translucent = NO; // change the colour if you like self.tabBar.barTintColor = [BT_color getColorFromHexString:@"#FF0000"]; } } return self; }
 
mutzy
Aspiring developer
Profile
Posts: 841
Reg: Nov 03, 2010
Medford, MA
9,860
like
03/14/14 04:52 PM (10 years ago)
Thanks!
 
Niraj
buzztouch Evangelist
Profile
Posts: 2943
Reg: Jul 11, 2012
Cerritos
37,930
like
03/14/14 05:47 PM (10 years ago)
Cool, Kittsy got you fixed. Consider adding in the JSON around that code to make it be programmable from the Global Theme settings "toolbarStyle":"solid"
 

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.