美文网首页
swfit demo1

swfit demo1

作者: 高乔人 | 来源:发表于2019-07-12 11:40 被阅读0次

    let screenW = UIScreen.main.bounds.size.width
    let screenH = UIScreen.main.bounds.size.height

    fileprivate let timeInterval = 0.1
    class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
       
    self.setupUI()
        
    }
    
    func setupUI() {
     self.view.addSubview(self.playBtn)
    }
    
    
    lazy var playBtn: UIButton = {
        let playBtn = UIButton(frame: CGRect(x: screenW*0.5, y: screenH*0.5, width: screenW*0.5, height: screenH*0.5))
        playBtn.backgroundColor = UIColor(red: 66/255.0, green: 75/255.0, blue: 226/255.0, alpha: 1.0)
        playBtn .setImage(UIImage(named: "play"), for: .normal)
        playBtn.addTarget(self, action: #selector(playBtnClick), for: .touchUpInside)
        
        return playBtn
    }()
    
    
    @objc func playBtnClick()  {
    

    }

    相关文章

      网友评论

          本文标题:swfit demo1

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