iOS swift 设置电量 计算属性实例

// width: 21
@IBOutlet var batteryBackView: UIView!
@IBOutlet var btteryContentView: UIView!
@IBOutlet var batteryTrailingConstraint: NSLayoutConstraint!
var batteryValue: CGFloat = 0 {
willSet {
batteryTrailingConstraint.constant = 19 - newValue/100*18
if newValue <= 10 { btteryContentView.backgroundColor = .hexColor(hexValue: 0xFA3C3C)

iOS swift 设置电量 计算属性实例最先出现在Python成神之路

版权声明:
作者:lichengxin
链接:https://www.techfm.club/p/11091.html
来源:TechFM
文章版权归作者所有,未经允许请勿转载。

THE END
分享
二维码
< <上一篇
下一篇>>