如何在 iphone SDK 中动态加载内容的两个标签之间设置相等的间距

发布于 2024-10-04 04:29:09 字数 259 浏览 0 评论 0原文

在我的 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

慢慢从新开始 2024-10-11 04:29:09

为什么不使用大小和约束动态调整文本大小,并根据它们创建/设置两个标签所需的两个框架?请参阅此基本示例:

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/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文