, . :
. . sizeWithFont: constrainedToSize: lineBreakMode: . , , . :
NSString *nextLine = rawTextWithoutQuotes;
NSRange range = [nextLine rangeOfString: @" " options: NSBackwardsSearch];
if (range.location == NSNotFound) {
return nextLine;
} else {
nextLine = [nextLine substringToIndex: range.location];
}
, , , , .
source
share