blob: 91136d0e9be88024050c43f6f58740008c84ccc4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
//
// UILabel+Utils.m
// Juick
//
// Created by Vitaly on 01.02.14.
// Copyright (c) 2014 com.juick. All rights reserved.
//
#import "UILabel+Utils.h"
@implementation UILabel (Utils)
+ (CGRect) sizeForLabel:(UILabel *)label width:(CGFloat)width {
return [label.text boundingRectWithSize:(CGSize) {width, CGFLOAT_MAX} options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName:label.font} context:nil];
}
@end
|