美文网首页
UILable 手动分行显示

UILable 手动分行显示

作者: 舒耀 | 来源:发表于2015-12-24 14:41 被阅读50次
UILabel *DeclarationLable = [[UILabel alloc] initWithFrame:CGRectMake(0, Screen_height-49, Screen_width, 49)];
//UILable分行显示numberOfLines必须设为0
DeclarationLable.numberOfLines = 0;
DeclarationLable.textAlignment = 1;
//通过"\n"来手动干预Lable分行,想分的更多就在需要分行的地加"\n"
DeclarationLable.text = @"积分商城由汽车导购提供,与设备生产商Apple Inc公司无关\n积分商城法律声明";
[self.view addSubview:DeclarationLable];

相关文章

网友评论

      本文标题:UILable 手动分行显示

      本文链接:https://www.haomeiwen.com/subject/ljvvhttx.html