简体   繁体   中英

How to change background color of storyboard in Xcode?

I'm working with white text (labels) in Xcode, and currently I can't see them because the background of the storyboard is also white. How do I change the appearance of the storyboard?

To clarify, I do not want my text to change color, I only want to change the appearance of the storyboard so that I can develop more easily.

If you are referring to the white in your view controller:

  • Select the View
  • Go to inspector (right panel, 4th item)
  • Change the background color field (section view)

I'm not sure you can do what you're trying to achieve. My best advice to you would be to create a dark coloured UIView which you can place behind the UILabel . Once you're happy you've got the UILabel setup the way you want it you can then just delete the UIView .

I have a quick trick. Set the "shadow" color, on the attributes inspector for the label, to black or whatever your actual background color is.

属性检查员 它如何出现在故事​​板中的示例

This is the way the text will show up in the storyboard. Hopefully adding the shadow won't be too expensive for your app, and you could take it out later.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM