开发者

Make label snap to the right edge of another label

I have a variable length title label in my view, and i would like a second label representing a count to be immediately to it's right.

The reason I'd like to do 2 labels is that I'd like the title to be truncated past a certain length, and the count to be visible after the ellipsis.

Is t开发者_C百科his approach the right way to do this? Or should i just build a single string based on title length?

Thanks


I would just use one label and truncate the string in my code. Its just one less IBOutlet you have to deal with and it will also make it easier if you ever want to change the length of the string in the future.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜