Interface Builder change text color bug?
Asked Answered
I

4

9

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?

Idette answered 18/6, 2012 at 23:56 Comment(0)
T
12

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.

Trespass answered 19/6, 2012 at 0:49 Comment(0)
M
1

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

Magnoliamagnoliaceous answered 11/4, 2013 at 10:39 Comment(0)
W
1

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

Weeny answered 27/5, 2013 at 21:13 Comment(0)
M
0

You can try selecting the text you want to change the color of, then click T to open the fonts window and change the color from there. Working for me on Xcode 11.2.1.

Middelburg answered 7/4, 2020 at 11:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.