딘이 맞습니다. 원한다면 수동으로해야합니다. 아래에 공백이 없더라도 레이블에 단어를 래핑합니다. 이것은 다른 사람이이 같은 문제가 발생 들어
NSString *someText = yourLabel.text;
//Check if the text contains spaces
//The method in the below if condition is user defined and you have to define one. lol
if(![self textContainsSpaces:someText])
{
//Do the word wrap manually
CGSize constraintSize;
constraintSize.width = 165;
constraintSize.height = 165;
CGSize stringSize =[someText sizeWithFont: [UIFont boldSystemFontOfSize: 17] constrainedToSize: constraintSize lineBreakMode: UILineBreakModeWordWrap];
CGRect rect = CGRectMake(yourLabel.frame.origin.x, yourLabel.frame.origin.y, 165, (stringSize.height+10));
yourLabel.frame = rect;
}
나 같은 독창적 인 독자를위한 노트 : iOS 7 및 SDK 8로 테스트 한 UILineBreakModeWordWrap은 현재와 같은 방식으로 작동합니다.즉, 가능한 경우 단어로 분리되지만 필요하면 문자로 분리됩니다. 이것은 UILabel의 경우입니다. – eselk