Skip to content

Instantly share code, notes, and snippets.

@sebjvidal
Last active June 3, 2024 09:46
Show Gist options
  • Save sebjvidal/013fc653dfbda4290ac35bbbad8dcfb1 to your computer and use it in GitHub Desktop.
Save sebjvidal/013fc653dfbda4290ac35bbbad8dcfb1 to your computer and use it in GitHub Desktop.
Private UIFont.TextStyles
import UIKit
extension UIFont.TextStyle {
static var emphasizedLargeTitle: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedTitle0")
}
static var emphasizedTitle1: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedTitle1")
}
static var emphasizedTitle2: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedTitle2")
}
static var emphasizedTitle3: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedTitle3")
}
static var emphasizedHeadline: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedHeadline")
}
static var emphasizedBody: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedBody")
}
static var emphasizedCallout: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedCallout")
}
static var emphasizedSubheadline: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedSubhead")
}
static var emphasizedFootnote: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedFootnote")
}
static var emphasizedCaption1: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedCaption1")
}
static var emphasizedCaption2: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedCaption2")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment