Rightpoint / BonMot

Beautiful, easy attributed strings in Swift
MIT License
3.56k stars 196 forks source link

Compilation issue in Xcode 13 beta 1 #409

Closed ZevEisenberg closed 3 years ago

ZevEisenberg commented 3 years ago

AdaptiveStyle.swift:

/// Enable automatic scaling of fonts obtained using `UIFontMetrics`
/// available on iOS 11+ based on the provided `textStyle` and optional
/// `maxPointSize`. If `maxPointSize` is `nil` the font will grow unbounded.
@available(iOS 11, tvOS 11, *)
case fontMetrics(textStyle: BonMotTextStyle, maxPointSize: CGFloat?)

Error:

🛑 Enum cases with associated values cannot be marked potentially unavailable with '@available'
ZevEisenberg commented 3 years ago

Looks like it's intentional, and this API might need a little rejiggering to make it work again 😕. Thanks to @theblixguy for digging up this link.