Sub SetBackgroundImage(b As Button, cr1 As String , state As Int)
Dim no As NativeObject = b
no.RunMethod("setBackgroundColor:forState:", Array(cr1, state))
End Sub
Sub SetBackgroundImage(b As Button, cr1 As Int , state As Int)
Dim no As NativeObject = b
no.RunMethod("setBackgroundColor:forState:", Array(no.ColorToUIColor(cr1), state))
End Sub
i guess their is no background color with state in ios but title color works
B4X:
Sub SetTitleColor(b As Button, cr1 As Int , state As Int)
Dim no As NativeObject = b
no.RunMethod("setTitleColor:forState:", Array(no.ColorToUIColor(cr1), state))
End Sub
use: SetTitleColor(startbtn,Colors.Green,1)
thanks anyway
EDIT: i solved it by adding a bitmap to state 1 with the background color i wanted so like this there is only for state 1 a background image and state 0 is the backcolor i choose, thanx