标签:
cell.textLabel.lineBreakMode =NSLineBreakByTruncatingTail;这样设置的时候,当textlabel的文本很长的时候,过长的部分显示为...
//下面是不同的样式对应的效果
typedef NS_ENUM(NSInteger, NSLineBreakMode) {
NSLineBreakByWordWrapping = 0, // Wrap at word boundaries, default
NSLineBreakByCharWrapping, // Wrap at character boundaries
NSLineBreakByClipping, // Simply clip
NSLineBreakByTruncatingHead, // Truncate at head of line: "...wxyz"
NSLineBreakByTruncatingTail, // Truncate at tail of line: "abcd..."
NSLineBreakByTruncatingMiddle // Truncate middle of line: "ab...yz"
} NS_ENUM_AVAILABLE(10_0, 6_0);
标签:
原文地址:http://www.cnblogs.com/zhoublog/p/5232663.html