在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
func heightOfCell(text : String) -> CGFloat {
let attributes = [NSFontAttributeName:UIFont.systemFontOfSize(14)] let option = NSStringDrawingOptions.UsesLineFragmentOrigin let rect:CGRect = text.boundingRectWithSize(CGSize(width: self.frame.size.width - 20, height: 0), options: option, attributes: attributes, context: nil) print("height is \(rect.size.height)") return rect.size.height + 50 }
|
请发表评论