LinkedInAttic / LayoutKit

LayoutKit is a fast view layout library for iOS, macOS, and tvOS.
http://layoutkit.org
Apache License 2.0
3.16k stars 267 forks source link

Remove UIView.init() is called in outside of the main thread #261

Open getogrand opened 5 years ago

getogrand commented 5 years ago

In class LabelLayoutDefaults, UILabel.init() is called on static stored property declaration. This leads [UIView init] must be used from main thread only warning on Xcode. Moreover, it breaks on runtime some cases (e.g. XCUITest tests layout built with using LabelLayout)

This PR fixes this problem.

image