ale*_*lex 1 button interface-builder ios swift
我正在尝试制作这个简单的用户界面
现在橙色和深蓝色是简单的两个视图(深蓝色将有一个嵌套的tableview),但我如何使用一些简单的动画制作按钮?我应该使用CALayer还是可以使用Interface Builder?
我会通过代码完成它:
    let button2 = UIButton()
    button2.frame = CGRectMake(0, 0, 100, 100)
    button2.layer.borderColor = UIColor.whiteColor().CGColor
    button2.layer.borderWidth = 2
    button2.layer.cornerRadius = 50
    button2.setTitle("button", forState: .Normal)
    button2.backgroundColor = UIColor.blueColor()
    button2.addTarget(self, action: "buttonAction", forControlEvents: .TouchUpInside)
    button2.setTitleColor(UIColor(red: 233/255, green: 64/255, blue: 87/255, alpha: 1), forState: UIControlState.Normal)
self.view.addSubview(button1)
| 归档时间: | 
 | 
| 查看次数: | 2998 次 | 
| 最近记录: |