Changing text layout in a UILabel - Specifically where it starts from
I have this problem with one of my UILabels, I would like to have the text that it displays begin being drawn at the top left of the label rather than the middle left.
Current scre开发者_C百科en:
As you can see the word "Description" in the label appears in the centre and to the left of the label. I would like it to start at the top-left instead. How do I implement this either programatically or in IB?
Thanks,
Jack
I'd assume that you're eventually going to put a description in, in which case it would be easier in the long run to simply make the UILabel for "Description" one line high, and put it at the top. Then, just add another multiline UILabel for the actual content. Having separate UILabels will make things simpler later.
Changing the Description label to a UITextView pretty much solved my problem. It allowed for multiple lines of text and was much simpler to implement. Also looked a little prettier.
Thanks for your help, particularly Daniel.
Jack
精彩评论