[ios] sizeWithFont: constrainedToSize: lineBreakMode: 함수 deprecated
CGSize textSize = [_label.text sizeWithFont:[UIFont boldSystemFontOfSize:[UIFont systemFontSize]] constrainedToSize:maxSize lineBreakMode:_label.lineBreakMode];
위와 같이 텍스트 사이즈를 얻기 위한 함수를 사용하면 ios7이상에서는 deprecated라고 노랑 워닝이 뜬다.
따라서 워닝을 없애기 위해 아래와 같이 수정
NSMutableParagraphStyle* paragraphStyle = [[NSMutableParagraphStyle alloc] init];
paragraphStyle.lineBreakMode = _label.lineBreakMode;
paragraphStyle.alignment = _label.textAlignment;
NSDictionary* attributes = @{NSFontAttributeName : [UIFont boldSystemFontOfSize:[UIFont systemFontSize]], NSParagraphStyleAttributeName: paragraphStyle};
CGSize textSize = [_label.text boundingRectWithSize:maxSize options:NSStringDrawingUsesFontLeading|NSStringDrawingUsesLineFragmentOrigin attributes:attributes context:nil].size;