简体   繁体   中英

How to change the background of a Text View in the storyboard of xcode

I am running into a problem in xcode storyboard to setup the graphics of an app. Nothing complicated, but I seriously don't understand the logic.

  1. Import an image view that will be the background. It is set as opaque, alpha = 1, it uses an image found on internet and the background is "default". It covers the whole iphone surface

  2. Import a text view. Now I am trying to have the background colour of the text view white. To do that, on the "Text Field" section, I have tried to use an image of white, found on the internet, no success. I have also tried in the "View" section to set the "Background" to white colour with alpha=1 and opaque activated, no success, the text view background looks exactly like the background picture, it does not stand out.

Does anyone know how to do this?

In case anyone wonders, I have been able to solve this programmatically using code lines like:

 myTextField.backgroundColor = UIColor.white

Still not sure why it does not work on the interface builder though.

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