iOS Question (solved) How to change the color of "color on" Switch at run time.

gudino jose luis

Active Member
Licensed User
Longtime User
hi JonPM
I tried the tintColor function, but only changes the border color, not the "ON COLOR"
thanks for your help
greeting
 
Upvote 0

JanPRO

Well-Known Member
Licensed User
Longtime User
B4X:
SwitchSetOnTintColor(Switch1,Colors.Blue)

Sub SwitchSetOnTintColor(SW As Switch, Color As Int)
    Dim NaObj As NativeObject = SW
    NaObj.RunMethod("setOnTintColor:",Array(NaObj.ColorToUIColor(Color)))
End Sub

 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…