Last active
March 30, 2020 09:15
-
-
Save jusonqiu/4f351ee0a34ed6a705993856044d5773 to your computer and use it in GitHub Desktop.
iOS.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//ios label | |
lineBreakMode:设置标签文字过长时的显示方式。 | |
label.lineBreakMode = NSLineBreakByCharWrapping; //以字符为显示单位显示,后面部分省略不显示。 | |
label.lineBreakMode = NSLineBreakByClipping; //剪切与文本宽度相同的内容长度,后半部分被删除。 | |
label.lineBreakMode = NSLineBreakByTruncatingHead; //前面部分文字以……方式省略,显示尾部文字内容。 | |
label.lineBreakMode = NSLineBreakByTruncatingMiddle; //中间的内容以……方式省略,显示头尾的文字内容。 | |
label.lineBreakMode = NSLineBreakByTruncatingTail; //结尾部分的内容以……方式省略,显示头的文字内容。 | |
label.lineBreakMode = NSLineBreakByWordWrapping; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment