问题
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