Skip to content

Instantly share code, notes, and snippets.

@aybekckaya
Created June 26, 2018 00:14
Show Gist options
  • Save aybekckaya/fecd6828e929e3e069e7526abd1d990e to your computer and use it in GitHub Desktop.
Save aybekckaya/fecd6828e929e3e069e7526abd1d990e to your computer and use it in GitHub Desktop.
enum AppFont {
case regularFont
case boldFont
case italicBoldFont
case italicFont
func font(size:CGFloat)->UIFont {
switch self {
case .boldFont: return UIFont(name: "Arial-BoldMT", size: size)!
case .italicBoldFont: return UIFont(name: "Arial-BoldItalicMT", size: size)!
case .italicFont: return UIFont(name: "Arial-ItalicMT" , size:size)!
case .regularFont: return UIFont(name: "ArialMT", size: size)!
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment