设置UILabel上省略号的位置

label.lineBreakMode=UILineBreakModeWordWrap;

下面是lineBreakMode的样式属性:

typedefenum {

    UILineBreakModeWordWrap = 0,            // Wrap at word boundaries

    UILineBreakModeCharacterWrap,           // Wrap at character boundaries

    UILineBreakModeClip,                    // Simply clip when it hits the end of the rect 

    UILineBreakModeHeadTruncation,          // Truncate at head of line: "...wxyz". Will truncate multiline text on first line

    UILineBreakModeTailTruncation,          // Truncate at tail of line: "abcd...". Will truncate multiline text on last line

    UILineBreakModeMiddleTruncation,        // Truncate middle of line:  "ab...yz". Will truncate multiline text in the middle

} UILineBreakMode;

xib中的设置:

设置UILabel上省略号的位置_第1张图片

 

 

转载于:https://www.cnblogs.com/sany007/archive/2013/03/19/2969607.html

你可能感兴趣的:(设置UILabel上省略号的位置)