label.lineBreakMode =NSLineBreakByCharWrapping;//其中lineBreakMode可选值为
linBreakMode enum{
//保留整个单词,以空格为边界
NSLineBreakByWordWrapping = 0,
//保留整个字符
NSLineBreakByCharWrapping,
//以边界为止
NSLineBreakByClipping,
//省略开头,以省略号代替
NSLineBreakByTruncatingHead,
//省略结尾,以省略号代替
NSLineBreakByTruncatingTail,
//省略中间,以省略号代替
NSLineBreakByTruncatingMiddle
}
网友评论