swift计算label动态宽度和高度 func getLabHeigh(labelStr:String,font:UIFont,width:CGFloat) -> CGFloat { let statusLabelText: NSString = labelStr let size = CGSizeMake(width, 900) let dic = NSDictionary(object: font, forKey: NSFontAttributeName) let strSize = st…