Skip to content

Instantly share code, notes, and snippets.

@sebjvidal
Created March 4, 2024 12:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • 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 emphasizedLargeTitle1: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedTitle1")
}
static var emphasizedLargeTitle2: UIFont.TextStyle {
return UIFont.TextStyle(rawValue: "UICTFontTextStyleEmphasizedTitle2")
}
static var emphasizedLargeTitle3: 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