Skip to main content

I think the best way to do this - if keeping the same font that is already assigned to the UILabel would be:

(using Swift)

label.font = label.font.fontWithSize(20)

(using Swift 3)

label.font = label.font.withSize(20)

Ideally I would set this in the viewDidLayoutSubviews method, as it doesn't need to change every time the view appears.

I think the best way to do this - if keeping the same font that is already assigned to the UILabel would be:

(using Swift)

label.font = label.font.fontWithSize(20)

Ideally I would set this in the viewDidLayoutSubviews method, as it doesn't need to change every time the view appears.

I think the best way to do this - if keeping the same font that is already assigned to the UILabel would be:

(using Swift)

label.font = label.font.fontWithSize(20)

(using Swift 3)

label.font = label.font.withSize(20)

Ideally I would set this in the viewDidLayoutSubviews method, as it doesn't need to change every time the view appears.

Source Link

I think the best way to do this - if keeping the same font that is already assigned to the UILabel would be:

(using Swift)

label.font = label.font.fontWithSize(20)

Ideally I would set this in the viewDidLayoutSubviews method, as it doesn't need to change every time the view appears.