On Xcode 12.0 beta 2 (12A6163b) it seems that initializing a segmented control with an arbitrary string once before swizzling the UIFont selectors fixes the crash.
private var isAppFontSetUp = false
func setUpAppFont() {
		guard !isAppFontSetUp else {
				return
		}
		let _ = UISegmentedControl(items: ["foo"])
		swizzle()
}
However, I am unsure if this fixes the crash for good since the root cause seems to lie in a cache (which might get purged again at some point).
Post
Replies
Boosts
Views
Activity
Can I track this bug somewhere?