IOS7中contentsize获取高度的方法

    [cell.methodTextView.text boundingRectWithSize:CGSizeMake(cell.methodTextView.frame.size.width, CGFLOAT_MAX) options:NSStringDrawingUsesLineFragmentOrigin | NSStringDrawingUsesFontLeading attributes:[NSDictionary dictionaryWithObjectsAndKeys:cell.methodTextView.font,NSFontAttributeName, nil] context:nil].size.height

textview中text字符串调用boundingRectWithSize方法获得CGpoint,通过CGpoint调用.size.height 



你可能感兴趣的:(IOS7中contentsize获取高度的方法)