Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interface Builder change text color bug?

This is driving me bananas..

If I select a UITextField in interface builder and go to change the text colour by manually entering the R G B values it changes the colour of the entire frame and background.

However if I change it using the sliders it changes the text colour only like I want.

Leads me to think its a bug... does this happen for anyone else?

like image 622
sayguh Avatar asked Jun 18 '12 23:06

sayguh


3 Answers

I see this happening with the latest version of Xcode as well. Both the Text Color and Background Color controls in the UILabel attribute inspector change at the same time when manually typing in a R G B value, whereas if I choose a color another way (e.g. from the crayons or palette views in the Color picker), only the text color control value changes.

I'd assume this is a bug (and should be filed via http://bugreporter.apple.com), but then again it's persisted through a few versions of Xcode so this may be their expected behavior on purpose. But I'd definitely agree you should file it as a bug.

like image 97
Michael Dautermann Avatar answered Oct 18 '22 09:10

Michael Dautermann


Definitely a bug! A temporary solution is to double click the text on the UILabel i.e. selecting all the UILabel text in the UI (storyboard or xib). Only so using the sliders changes the text colour. Hope it helps

like image 1
Lukas Avatar answered Oct 18 '22 08:10

Lukas


Or change the color and then set the background color back to transparent. For me the fastest workaround. Same bug with UILabel.

like image 1
Martin Stolz Avatar answered Oct 18 '22 07:10

Martin Stolz