本文摘自:http://www.cocoachina.com/bbs/simple/?t50503.html 

代码改这样设一下的话可以实现,而且不会很麻烦:
UIButton 设置类型为UIButtonTypeCustom
setTitleColor 可以设置button上文字的颜色,backgroundColor设置为clearColor就可以实现button透明文字不透明

 

 

 

相关文章: