UILable 手动分行显示

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 手动分行显示)