I'm having some confusion about UIButton on the storyboard. I create a new button, change the background color, and the color is always darker than what I choose. In this example, the actual color that is being displayed is #163ca1 (22, 60, 161), even though I clearly picked something lighter:
Wassup with that? The thing is, if I set the background color programmatically it displays the correct color. This issue extends to other view elements as well.
Also, what does Tint color do? It seems like it has a different function depending on the element in question, but in this case it seems to have no effect. I figured it was for the highlighted state, but no matter what I change it to the button text maintains a light blue color on click.
Related
When you enable allowsMultipleSelectionDuringEditing on a UITableView and then enter edit mode on it, each row will display a light grey circle on the left hand side. Upon tapping a row, the circle will be replaced with a tick icon, of the tint colour currently set to the table view.
I'm wondering, is there any way to override the tint colours of both of these icons and control them manually? I've discovered if you set cell.tintColor, you can override the tint colour of the icon when it's checked (But not the hollow circle graphic), but I'd rather be able to change the tint colour of just this icon.
I'm getting the sinking feeling the only way to do this is to manually hack the internal subviews, but I'm hoping someone may have found a way I've missed.
Setting the tintColor property of the cell should be enough.
e.g.
cell.tintColor = .green
I would like to change a UISwitch' button color - not the background color.
I know about "tintColor" and "onTintColor", they work very well.
This is the effect I would like to achieve though.
I have managed to change the background color to the desired color, but I'm not able to change the button itself. It's always white -- can I change its color? And is it possible to make the button smaller?
There's no native colour tint controls for UISwitch. You'd need to either write your own or use something like SevenSwitch or MBSwitch to get the effect you're looking for.
Personally I prefer MBSwitch as it doesn't require the use of images, and as you can see, you get a similarly colored control to what you're asking for:
I would like to change the colour of a button, for example make it from grey --> yellow. Do you know if this is possible? I didn't see any colour option in the button's property, but there must be a way to change its colour.
If it is not possible, please tell me if and how i can change the colour of button's caption. I have selected different colours, but it still hasn't changed, it remains black, perhaps i am doing something wrong.
I am using delphi7 btw
for change font color of button , in project->option->application->Appearance use custom style for project
and then in button styleelements property disable sefont
Setting a custom background image (for iOS < 5) in the style of a tinted rounded rect text field works fine,
yet I can't change it back to normal or not even to another background image, once it's set.
I'm calling setBackground:nil and setBorderStyle:UITextBorderStyleRoundedRect on the view in order to reset it.
There is some effect: The edge of the border gets slightly lighter, as if the desired view is drawn behind it, but it's not set back to the normal appearance. Calling setNeedsDisplay doesn't help either.
Am I missing another property?
I have a UISegmentedControl with a black tint so the selected element is not visually different to the other elements as iOS darkens the selected item and hence black remains unchanged. Does anyone know how to make the selected element a lighter color/shade without using undocumented methods? I have successfully achieved this with a graduated layer but there must be an easier way!
Here is an description how you can set an tintcolor for each segment.
http://www.framewreck.net/2010/07/custom-tintcolor-for-each-segment-of.html