let screenh = UIScreen.main.applicationFrame.size.height
let screenw = UIScreen.main.applicationFrame.size.width
let vFooter:UIView = UIView()
vFooter.frame = CGRect(x:0, y:screenh-74-44, width:screenw, height:74)
vFooter.backgroundColor = UIColor.clear
self.view.addSubview(vFooter)
let btnApply:UIButton = UIButton(type:.custom)
btnApply.frame = CGRect(x:30, y:15, width:screenw-60, height:44)
btnApply.setTitle("立即申请", for: UIControlState.normal)
btnApply.layer.masksToBounds = true
btnApply.layer.cornerRadius = btnApply.frame.size.height/2
btnApply.setTitleColor(UIColor.white, for: UIControlState.normal)
btnApply.backgroundColor = UIColor(red: CGFloat(44)/255.0, green: CGFloat(154)/255.0, blue: CGFloat(255)/255.0, alpha: 1)
btnApply.addTarget(self, action:#selector(clickBtnApply(_:)), for: .touchUpInside)
vFooter.addSubview(btnApply)
按钮的点击事件
func clickBtnApply(_ sender: Any) {
}
网友评论