美文网首页UIKit
UIKit - UISwitch

UIKit - UISwitch

作者: ienos | 来源:发表于2022-08-22 22:22 被阅读0次

修改不同状态下的颜色

/// 开启状态
switch.onTintColor = onColor
/// 关闭状态
switch.tintColor = offColor
switch.layer.cornerRadius = switch.frame.height / 2.0
switch.backgroundColor = offColor
switch.clipsToBounds = true

相关文章

网友评论

    本文标题:UIKit - UISwitch

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