I have a little problem with multiline UILabel, my UILabel text like starts from the middle strangely and it goes up when new lines arrive so that the last line is on the middle always. I want it to behave like a normal textview, starting from top and lines going under each other, first line staying on top. Sorry if I explained it badly, I can try to elaborate if needed! Thanks in advance!
Share
You can use the
sizeWithFont:constrainedToSize:lineBreakMode:method on NSString to figure out the height of a block of text given a font and a constrained width. You would then update the frame of your label to be just large enough to encompass the text.