开发者

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:

Changing text layout in a UILabel - Specifically where it starts from

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜