使 UILabel 的文本“Stick”当有多行时到顶部 - ios
我有一个使用 xib 文件加载的 UILabel,最多 2 行。
当我有 2 行文本时,一切正常,但如果我只有 1 行,它就会写在标签中间,我不希望这种情况发生。我只是希望它粘在顶部,就好像标签足够高以容纳 1 行一样。
我该如何实现这个?
嗯!
I have a UILabel which is loaded using a xib files, with the maximum of 2 rows.
When I have 2 rows of text, it all works fine, but If I have only 1, it is being written in the middle of the label, and I dont want that to happen. I just want it to stick to the top, as if the label was high enough for 1 row.
How can I implement this?
Tnx!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论