Swift Moth

UILabel

A 1-post collection

Page 1 of 1

Calculate height of multi-line UILabel

func heightForLabel(#fontSize: CGFloat, labelWidth: CGFloat) -> CGFloat { let label:UILabel = UILabel(frame: CGRectMake(0, 0, labelWidth, CGFloat.max)) label.numberOfLines = 0 label.lineBreakMode = NSLineBreakMode. »

Jack Chen S Y on UI, swift-1.2, UILabel 03 July 2015
Page 1 of 1
Swift Moth © 2021
Proudly published with Ghost