Declaring and initializing UIFont

suggest change

You can declare a UIFont as follows:

var font: UIFont!

UIFont also has these initializers:

UIFont(name:size:) returns nil when that font is not installed:

let font = UIFont(name: "Helvetica Neue", size: 15)

Many controls, such as a UILabel, default to the system font at 17 points. A size of 0 in UIFont(descriptor:size:) means “use the size stored in the descriptor.”

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents