如何在iPhone中更改文本字段的背景颜色? [英] How to change background color of the textfield in iphone?
本文介绍了如何在iPhone中更改文本字段的背景颜色?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将文本字段的背景颜色更改为透明的颜色.我尝试过
I want to change the background color of the textfield to something which is transparent. I have tried
option5btn.backgroundColor = [UIColor grayColor];
但是我想要其他颜色.谁能告诉我在iPhone文本框的背景中可以使用哪些颜色.
But I want some other color. Can anyone tell me which all colors can be used in the iphone textfield's background.
有人可以帮我吗?
推荐答案
[UIColor colorWithRed:0.2f green:0.3f blue:0.4f alpha:0.50001f];
这是我经常使用的方法.
That's an approach I use regularly.
这篇关于如何在iPhone中更改文本字段的背景颜色?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文