Question: how to change the background color in xcode?
Answer: Select the Label click on "Attribute Inspector" and scroll down you will see background option under View Section. 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.