Swift

swift UISwitch 实现

2020-06-17  本文已影响0人  江河_ios

简单实现

   lazy var swith:UISwitch = {
    let swith = UISwitch.init()
    swith.frame = CGRect(x: 20, y: self.layder.maxY+20, width: 80, height: 30)
    swith.onTintColor = UIColor.green
    swith.thumbTintColor = UIColor.orange
            
    return swith
}()
上一篇 下一篇

猜你喜欢

热点阅读