如何让button的背景为透明的,而button上面的文字是显示出来的

如题所述

代码改这样设一下的话可以实现,而且不会很麻烦:
UIButton 设置类型为UIButtonTypeCustom
setTitleColor 可以设置button上文字的颜色,
backgroundColor设置为clearColor就可以实现button透明文字不透明
温馨提示:答案为网友推荐,仅供参考
相似回答