开发者

How can we set an equal spacing between two labels where contents dynamically loaded in iphone SDK

In my开发者_StackOverflow中文版 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


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/

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜