Skip to content

Instantly share code, notes, and snippets.

@laevandus
Created September 8, 2023 08:47
Show Gist options
  • Save laevandus/cbb270f6d5ade86d1d055108be02b360 to your computer and use it in GitHub Desktop.
Save laevandus/cbb270f6d5ade86d1d055108be02b360 to your computer and use it in GitHub Desktop.
// This API is available in iOS 16, macOS 13.0, tvOS 16.0, watchOS 9.0.
// Using backDeployed we can make it available in old OSes, like iOS 15 etc
extension Font {
@backDeployed(before: iOS 16.0, macOS 13.0, tvOS 16.0, watchOS 9.0)
@available(iOS 15.0, macOS 12.0, tvOS 15.0, watchOS 8.0, *)
public static func system(size: CGFloat, weight: Font.Weight? = nil, design: Font.Design? = nil) -> Font {
fatalError("Implement")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment