Button.titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;// 设置尾部省略
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);