Fixed color setting crash.
This commit is contained in:
@@ -328,11 +328,13 @@ class MTFractionDisplay : MTDisplay {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func updateDenominatorPosition() {
|
func updateDenominatorPosition() {
|
||||||
denominator?.position = CGPointMake(self.position.x + (self.width - denominator!.width)/2, self.position.y - self.denominatorDown)
|
guard denominator != nil else { return }
|
||||||
|
denominator!.position = CGPointMake(self.position.x + (self.width - denominator!.width)/2, self.position.y - self.denominatorDown)
|
||||||
}
|
}
|
||||||
|
|
||||||
func updateNumeratorPosition() {
|
func updateNumeratorPosition() {
|
||||||
numerator?.position = CGPointMake(self.position.x + (self.width - numerator!.width)/2, self.position.y + self.numeratorUp)
|
guard numerator != nil else { return }
|
||||||
|
numerator!.position = CGPointMake(self.position.x + (self.width - numerator!.width)/2, self.position.y + self.numeratorUp)
|
||||||
}
|
}
|
||||||
|
|
||||||
override var position: CGPoint {
|
override var position: CGPoint {
|
||||||
@@ -399,8 +401,8 @@ class MTRadicalDisplay : MTDisplay {
|
|||||||
override var textColor: MTColor? {
|
override var textColor: MTColor? {
|
||||||
set {
|
set {
|
||||||
super.textColor = newValue
|
super.textColor = newValue
|
||||||
self.radicand!.textColor = newValue
|
self.radicand?.textColor = newValue
|
||||||
self.degree!.textColor = newValue
|
self.degree?.textColor = newValue
|
||||||
}
|
}
|
||||||
get { super.textColor }
|
get { super.textColor }
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user