2 Commits

Author SHA1 Message Date
Oskar 047205a881 Default ratio off 2018-08-08 21:59:18 +02:00
Oskar ed64989887 Initialization fix 2018-08-08 21:54:09 +02:00
2 changed files with 5 additions and 9 deletions
+5 -9
View File
@@ -68,7 +68,7 @@ import QuartzCore
reloadLayer()
}
}
@IBInspectable public var ignoreRatio: Bool = false {
@IBInspectable public var ignoreRatio: Bool = true {
didSet {
reloadLayer()
}
@@ -117,18 +117,14 @@ import QuartzCore
setup()
}
override public func awakeFromNib() {
super.awakeFromNib()
reloadLayerSize()
reloadLayer()
setupIcon()
}
internal func setup() {
isEnabled = true
setupLayers()
reloadLayerSize()
setupIcon()
reloadLayer()
}
public func setOn(isOn: Bool, animated: Bool) {
if self.isOn != isOn {
self.isOn = isOn