Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
How do you set a color with objc?
-
-
when dealing with objc, you usually need to look up the reference page from Apple to see what the arguments types are.
In this case, it takes a UIColor. Objc_util comes with UIColor already aliased for you. Poke around the UIColor.... autocomplete in the console, and you may find some useful ones.
S.thumbTintColor=UIColor.colorWithRed_green_blue_alpha_(0.4,.2,.01,1)
or, for example
S.thumbTintColor=UIColor.colorWithHexString_('ff1aa0')
UIVolor also has a bunch of "named colors" like UIColor.redColor(), etc.
-
@JonB thank you! Good to know!