美文网首页
UIButton圆角和阴影

UIButton圆角和阴影

作者: 只会ctrl_c_v | 来源:发表于2017-01-04 16:41 被阅读208次

let bt =UIButton.init(frame:CGRect(x:20, y:250, width:120, height:60))

bt.backgroundColor=UIColor.orange

bt.layer.cornerRadius=10.0

bt.layer.shadowOffset=CGSize(width:1, height:1)

bt.layer.shadowOpacity=0.8

bt.layer.shadowColor=UIColor.green.cgColor

bt.setTitle("搞事情", for: .normal)

self.view.addSubview(bt)

相关文章

网友评论

      本文标题:UIButton圆角和阴影

      本文链接:https://www.haomeiwen.com/subject/hhzovttx.html