Reputation: 12179
I'm a newby in XCode/iOS development, and I want to change bakckground color of my label (XCode 5.0):
But this tab has got settings of font, alignment, but no background color options! There is "View" section at the bottom, but it is empty. Please, tell me where can I find settings of background color? Thanks
Upvotes: 6
Views: 31532
Reputation:
mylabel.backgroundColor = [UIColor redColor] ;
is the code to change the background color. You get the color name before "Color" from the names of colors in the Apple color palette.
Upvotes: 2
Reputation: 737
At the top select the attributes inspector. Under the section "View" there should be a spot that says "Background". click that and choose your colour.
(refer to image for help)
Upvotes: 6
Reputation: 510
Select the Label click on "Attribute Inspector" and scroll down you will see background option under View Section.
Select label before you go to Attribute Inspector
Upvotes: 3