How to make a Multi-line (2 lines) label truncate the last line (OS X)

不想你离开。 提交于 2019-12-22 13:00:55

问题


I'm trying to make a multi-line label with 2 lines truncate the last line only. But it seems that, if I choose the Layout of that label as Truncates, my multi-line label becomes one-line.

Here's what I want (I manually typed "..." for demonstration purposes):


Here's what I have when I set my label as Truncates in IB (as you can see it still has 2 lines but acts as if it was only 1):



Is this supposed to happen? If not, how can I achieve the truncate style of the first image?
Thanks!

回答1:


It looks as though you must have Uses Single Line Mode checked, which should be unchecked. Also, under Layout is the Control section, which can be set to specify which part of the label to truncate and whether to clip, wrap, and which portion to truncate (head, middle, tail).

[ 1 ]



来源:https://stackoverflow.com/questions/20024349/how-to-make-a-multi-line-2-lines-label-truncate-the-last-line-os-x

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!