From cba881157836cc7eac015ccb6e9cf32990d3ad48 Mon Sep 17 00:00:00 2001 From: Michael Griebling Date: Mon, 16 Jan 2023 11:01:32 -0500 Subject: [PATCH] Fix error. --- Sources/SwiftMathRender/MathRender/MTMathUILabel.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftMathRender/MathRender/MTMathUILabel.swift b/Sources/SwiftMathRender/MathRender/MTMathUILabel.swift index 8f6aec8..e2d6a9a 100644 --- a/Sources/SwiftMathRender/MathRender/MTMathUILabel.swift +++ b/Sources/SwiftMathRender/MathRender/MTMathUILabel.swift @@ -209,7 +209,11 @@ public class MTMathUILabel : MTView { context.restoreGState() } - override public func layoutSubviews() { + #if os(iOS) + override public func layoutSubviews() { _layoutSubviews() } + #endif + + public func _layoutSubviews() { if mathList != nil { displayList = MTTypesetter.createLineForMathList(mathList, font: font, style: currentStyle) displayList?.textColor = textColor @@ -257,7 +261,7 @@ public class MTMathUILabel : MTView { func setNeedsLayout() { self.needsLayout = true } override public var isFlipped: Bool { false } override public func layout() { - self.layoutSubviews() + self._layoutSubviews() super.layout() } #endif