Skip to content
This repository was archived by the owner on Feb 17, 2021. It is now read-only.

Commit 41c88e2

Browse files
committed
Remove UIView.init() is called in outside of the main thread
1 parent 34abc8e commit 41c88e2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/Layouts/LabelLayout.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,9 @@ open class LabelLayout<Label: UILabel>: BaseLayout<Label>, ConfigurableLayout {
165165

166166
public class LabelLayoutDefaults {
167167
public static let defaultNumberOfLines = 0
168-
public static let defaultFont = UILabel().font ?? UIFont.systemFont(ofSize: 17)
168+
public static var defaultFont: UIFont {
169+
return UILabel().font ?? UIFont.systemFont(ofSize: 17)
170+
}
169171
public static let defaultAlignment = Alignment.topLeading
170172
public static let defaultLineBreakMode = NSLineBreakMode.byTruncatingTail
171173
public static let defaultFlexibility = Flexibility.flexible

0 commit comments

Comments
 (0)