如何在 iphone SDK 中动态加载内容的两个标签之间设置相等的间距
在我的 iPhone 应用程序中,我需要当天的报价。
我想以引用及其作者姓名的方式显示引用。
我希望无论引用有多大或多小,作者姓名都应位于引用下方,留一个空白行。
我尝试使用这两个标签,但它对于较大的引用效果很好,但对于较小的引用,作者姓名似乎与引用相距太远。
我希望引文和作者姓名之间的间距相等,无论引文有多大或多小。
我应该怎么办?
请帮助和建议。
非常欢迎您的建议
谢谢
In my iphone app, i have a requirement for quote of the day.
I want to display the quote in the manner as quote and its author name.
I want that no matter how big or how small the quote is the author name should come below the quote leaving one blank line.
I tried using the two labels but it works well for bigger quotes but for small quotes the author name seems too far away from the quote.
I want equal spacing between quote and author name no matter how big or small the quote is.
What should I do?
Please Help and suggest.
Your suggestions are most welcome
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
为什么不使用大小和约束动态调整文本大小,并根据它们创建/设置两个标签所需的两个框架?请参阅此基本示例:
http://www.cimgf.com/2009 /09/23/uitableviewcell-动态高度/
Why don't you size the text dynamically using size and constraint and depending on them create/set the two frames needed for the two labels? See this basic example:
http://www.cimgf.com/2009/09/23/uitableviewcell-dynamic-height/