We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
具体问题就是字符串有多个回车,Label限制行数,如果没显示完,MLLinkLabel不会有...,UILabel是有的
...
- (void)viewDidLoad { [super viewDidLoad]; NSString *str =@"#2017北京诗歌节#《流浪的小狗》\n\n一道道隱匿的憂傷\n一曲曲哀婉的琴瑟夕陽\n還有我這只小狗正在流浪\n流浪,流浪\n沒有憐憫,沒有援扶 "; MLLinkLabel *l = [[MLLinkLabel alloc]init]; l.numberOfLines = 3; l.frame = CGRectMake(12, 12, 0, 0); l.preferredMaxLayoutWidth = [UIScreen mainScreen].bounds.size.width - 24; l.text = str; [l sizeToFit]; [self.view addSubview:l]; UILabel *l2 = [[UILabel alloc]init]; l2.numberOfLines = 3; l2.frame = CGRectMake(12, 100, 0, 00); l2.preferredMaxLayoutWidth = [UIScreen mainScreen].bounds.size.width - 24; l2.text = str; [l2 sizeToFit]; [self.view addSubview:l2]; }
The text was updated successfully, but these errors were encountered:
我这边遇到的问题跟你还有不一样,具体的问题是字符串与字符串之间有多个回车,Label限制行数,字符串与字符串之间的回车就没有了,如果不设置限制行数的话就显示正常;
Sorry, something went wrong.
No branches or pull requests
具体问题就是字符串有多个回车,Label限制行数,如果没显示完,MLLinkLabel不会有
...
,UILabel是有的The text was updated successfully, but these errors were encountered: