Swift 寫的分享按鈕
作者:luckysixdays
Swift 寫的分享按鈕,簡單好用
源碼簡介:Swift 寫的分享按鈕,簡單好用
測試環(huán)境:Xcode 6.2,iOS 7.0以上
源碼效果:
源碼片段:
- let deformationBtn = DeformationButton(frame: CGRectMake(100, 100, 140, 36), color: getColor("e13536"))
- self.view.addSubview(deformationBtn)
- deformationBtn.forDisplayButton.setTitle("微博注冊", forState: UIControlState.Normal)
- deformationBtn.forDisplayButton.titleLabel?.font = UIFont.systemFontOfSize(15);
- deformationBtn.forDisplayButton.setTitleColor(UIColor.whiteColor(), forState: UIControlState.Normal)
- deformationBtn.forDisplayButton.titleEdgeInsets = UIEdgeInsetsMake(0, 6, 0, 0)
- deformationBtn.forDisplayButton.setImage(UIImage(named:"微博logo.png"), forState: UIControlState.Normal)
- deformationBtn.addTarget(self, action: "btnEvent", forControlEvents: UIControlEvents.TouchUpInside)
責(zé)任編輯:倪明