Hi "ohho" There is no such method or property with which you can achieve this, but this is possible using jugad (native word) technology. In the following code, I assume that myLabel is a UILabel object that displays the text in the desired form, where the text is taken from myTextField (UITextField object).
CGFloat height= myLabel.font.lineHeight;
int lineCount = myLabel.frame.size.height/height;
float temp = [myTextField.text length]*1.0f/lineCount;
int charPerLine = temp;
charPerLine = (temp > charPerLine)?charPerLine+1:charPerLine;
NSString* original = myTextField.text;
NSString* modifiedString = @"";
for (int i =0; i < lineCount; i++)
{
for (int j = charPerLine-1 ; j >=0; j--)
{
NSRange r = NSMakeRange(i+j*lineCount, 1);
if (r.location < [original length]) {
modifiedString =[modifiedString stringByAppendingFormat:@"%@ ",[original substringWithRange:r]];
}
}
modifiedString = [modifiedString stringByAppendingString:@"\n"];
}
myLabel.text = modifiedString;
source
share