How to set Hex color code in xib in iOS - ios

I am not finding an option for Hex color code in xib color picker in xcode.
But I have seen in stack over flow answer,
https://stackoverflow.com/a/27283783/4391112.
In this, image is having Hex color code option in color picker.
Xcode version : 6.1.1
How can i get that hex color code in color picker in xib.
Please suggest me.
Thanks
Update: Is there any plugin for xcode to select color in hexa color code. I am using xcode 6.1.1.
or is there any setting in xcode to change the colr in hexa code.
please help me guys

Select Color Picker From Xib , then choose the RGB Slider from second option Color Slider , now you can Enter HEX color (Below RGB Slider) Codes or Select RGB Values from Sliders.

xcode version 11.x
Within the view controller,
click on custom for background.
Click on the 3 line rgb sliders tab
Click Grayscale slider
Choose RGB Sliders

Related

Storyboard is not showing custom color hex code in XCode 12.0.1

After updating to the latest Xcode, into storyboard I am not able to see actual custom color hex code. It is showing a white(FFFFFF) color hex code all time.
Can someone please help me with this? Please check the below screenshot.
I have noticed this same problem since the latest XCode Version 12.0.1.
A workaround that works for me is to
Click on the custom color to bring up the color chooser.
The color chooser is the wrong color, but tap on any other color in the color chooser.
Tap Cmd+Z to undo the color change. Magically the original custom color is now selected in the color chooser.
Almost the same idea work around and quicker without needing to change the color (and then reverse):
Select your color (this will make the color picker appear) in the drop list.
Select again your color (with the picker still shown) in the drop list (not in the color picker window), it will update the picker to your color.
Apple has now fixed this issue in Xcode 12.5
Fixed an issue where the custom colors swatch in an inspector’s color
properties displayed an incorrectly offset focus indicator.
Reference: Apple Xcode 12.5 Release Notes

Is there a colors.xml equivalent for IOS storyboards?

Right now I am setting all my colors by hand when editing in the storyboard. This is rather unfortunate as any future changes to hex codes will mean that I need to manually change each colored element.
I was wondering if there was a way to abstract all color configurations into a colors.xml android-esque file for IOS
It's only available in iOS 11 and later, but you can make a color set in your .xcassets file and reference that color in your storyboards and your code, as described in this blog post

UIColor colour with image is not working below IOS 7

I have to set a color to text of UITextField. That colour text will be dynamic and its colour will be get from am Image of One colour(say white, hello, brown image). If i have to do statically then i can do by getting RGB of image. but the images are dynamic.
I am using below code to set the colour text of UItextview
_textView.textColor = [UIColor colorWithPatternImage:Image];
This code is working fine in IOS7 but not working below IOS7
How we can fix this issue?
The code is fine. -[UIColor colorWithPatternImage:] works well below iOS 7. There must be something elsewhere in your code causing the problem.

iOS 7 UIDatePicker - missing white text?

I'm just updating my application to use iOS 7. My plan is to set the background color in black with white text on a UIDatePicker. Is there a possible way I can set the color of the text on a UIDatePicker? If not, then it would be nice to have "setDatePickerViewStyle:UIDatePickerStyleLightContent" for UIDatePicker to be similar to the status bar style.
Any suggestion appreciated.
According the the styling guide, UIDatePickers cannot be styled:
https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/UIKitUICatalog/UIDatePicker.html#//apple_ref/doc/uid/TP40012857-UIDatePicker-SW1

iOS5 button transparency with png image as background

I am running into some problems with one button that I am customizing for my app and I need some help with it. When I test the button with iOS 6 there are no problems with the button transparency and the png image is viewed like this
but when i test my app with iOS 5 the button is not transparent:
I have the following settings for the button:
Thanks in advance for any suggestions of how to solve this problem.
Have you kept Button Type as UIButtonTypeCustom in UIButton Type property

Resources