iOS Question Change top and bottom bars color

jaraiza

Active Member
Licensed User
Hi,

Is there any way to change both bars colors? My main Page's color is yellow, and since those bars are gray I was asked to change them :confused:

Thanks!
 

jaraiza

Active Member
Licensed User
This indeed worked for navigationBar, but toolbar didn't change (not even with translucent)


B4X:
Dim OBJNavBar As NativeObject = NavControl
OBJNavBar.GetField("navigationBar").RunMethod("setBarTintColor:", Array(OBJNavBar.ColorToUIColor(Colors.Yellow)))
OBJNavBar.GetField("navigationBar").SetField("translucent", False)
   
Dim OBJToolBar As NativeObject = NavControl
OBJToolBar.GetField("toolbar").RunMethod("setBarTintColor:", Array(OBJToolBar.ColorToUIColor(Colors.Yellow)))
OBJToolBar.GetField("toolbar").SetField("translucent", False)
I tried to use "Toolbar", "toolBar" and "ToolBar" just in case, but all of those thrown not-exist errors.

 

Erel

Administrator
Staff member
Licensed User
This code works:
B4X:
  Dim OBJNavBar As NativeObject = NavControl
   OBJNavBar.GetField("toolbar").RunMethod("setBarTintColor:", Array(OBJNavBar.ColorToUIColor(Colors.Yellow)))
   OBJNavBar.GetField("navigationBar").RunMethod("setBarTintColor:", Array(OBJNavBar.ColorToUIColor(Colors.Yellow)))
   OBJNavBar.GetField("navigationBar").SetField("translucent", False)
 

jaraiza

Active Member
Licensed User
I'm testing the code in an iPad Air (iOS 7) and I got the same result as the picture I uploaded before, the bottom bar is still gray :(
 

jaraiza

Active Member
Licensed User
Unless there's a bug in iOS 7.1.2 I'm out of answers :(

Here is the (unlisted) video on youtube:

 
Top