UISegment selected/unselected color in xib - ios

My app has separate code and bundle (xib are to be downloaded separately). I can't change my code yet and I have to change xib file.
On ios 7, I can see correctly like this when I change in my xib.
With that setting, on my ios 6, selected color and unselected color become same (black). User can't differentiate.
How can I change in my xib so that behaviour is correct? (I can't change my code for now. I can only change xib). If Tint color is default, it is okay but I still need it to be black color.

you are setting tint color, which is correct approach. It’s background color is white that means it’s default color and you are setting black color as tint color so it is also fine.
So make sure that your SegmentControl’s style is plain and state is not checked beside Momentary. Make sure that state is unchecked. If it is checked then uncheck it. You can check all this under attribute inspector with your segmented control selected.

Related

UITabBar not changing tint color Xcode 9.3

This is very odd. My global tint is set and my icons colors are set to the default purple I have. Yet at run time its blue. Any tips? Ive checked around and have not seen anyone else with this problem.
Storyboard:
Run Time:
Basically, when you want to change the tint color of UITabBar programmatically, UITabBar class gives you several tint color properties:
tintColor: TabBarItem's color.
barTintColor : TabBar's background bar's color.
unselectedItemTintColor : color of unselected items.
so if you change the tintColor, barItems' color would be changed.
...but, Why it doesn't works on IB?
When you set a specific color to UITabBar's item in IB, there's an option named Image Tint.
Changing a Tint option on "View" section won't affect anything to TabBar's items but only Image Tint option can change tabBar's item color.
storyboard's global tint color option changes Tint option of "View" section, but doesn't affect default value of Image Tint option, so It doesn't affect the tab bar's tint color.
So.. Why Image Tint option doesn't affected?
I can't explain why doesn't it affected. Maybe Apple had an issue with this, or kind of bug.
there are some workarounds for setting an image color :
Explicitly Set an Image Tint option to UITabBarController's TabBar object.
You may should set every TabBarController's Image Tint option, because it doesn't affects global setting.
Programmatically change global UITabBar's tintColor.
At AppDelegate.swift's didFinishLaunchingWithOptions, paste following code
UITabBar.appearance().tintColor = <#Color what you want#>
I've had a similar problem, which was fixed by changing the "Render As" property to "Default" instead of "Original". You can find this in your Asset Library, when selecting your images on right right hand side under "Render As" in the attributes inspector.

XCode UIButton confusion

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.

UIStepper tintColor not functioning?

I recently updated my project to iOS 7.1. During the switch, nothing changed except for one thing. In iOS 7, within my app delegate, I set my window tint color to blue. On a view controller, I have a UIStepper that I set the tint color as white in both Interface Builder and programmatically. Prior to updating, the stepper was tinted white while everything else was blue as it should have been. After being updated, however, the stepper remains the tint color of my app. Does anybody know why this happens, or how to fix it? Any insight is appreciated. Thank you.
I solved the problem by clicking on my UIStepper in Interface Builder, clicking on the first pane of the item inspector, and changing global tint to white.

iOS 7 — Storyboard default tint color

I have multiple storyboards in my app and for one specific storyboard I wish to have a different color scheme. This may not be according to iOS 7 guidelines but nonetheless, I am wondering if there is a way to change the tint color for every UIControl for a particular storyboard.
Yes, if you go to the File inspector, you can set the global color per storyboard. In fact, I don't think you can set the tint color for multiple storyboards at once (aside from doing it in code).
Select the File inspector:
The second section looks like this:
Change the Global Tint, and that color will be the tint color for your entire storyboard.
From Code Swift 3
you can change tint for all view using one line of code
UIView.appearance().tintColor = UIColor.green

Delphi7 How do I change the color of a button and its caption?

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

Resources