美文网首页
Swift Switch

Swift Switch

作者: Look2021 | 来源:发表于2021-12-22 10:26 被阅读0次
    lazy var cankaoSwitch: UISwitch = {
        let uiSwitch = UISwitch.init()
        uiSwitch.transform = CGAffineTransform.init(scaleX: 0.6, y: 0.6)
        //设置默认值
        uiSwitch.backgroundColor = .themeColor
        uiSwitch.tintColor = UIColor.themeColor//Switch 边框颜色
        uiSwitch.onTintColor = UIColor.themeColor//Switch为on时候的颜色
        uiSwitch.cornerRadius = uiSwitch.height / 0.6 / 2
        return uiSwitch
    }()
    

    相关文章

      网友评论

          本文标题:Swift Switch

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