UILabel 多行文字自动换行 (自动折行)
1.UIView *footerView = [[UIView alloc] initWithFrame:CGRectMake(10, 100, 300, 180)];
2. UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(10, 100, 300, 150)];
3. label.text = @"where are you? where are you? where are you? where are you? where are you? where are you? where are you? where are you? where are you? where are you?";
4. //清空背景颜色
5. label.backgroundColor = [UIColor clearColor];
6. //设置字体颜色为白色
7. label.textColor = [UIColor whiteColor];
8. //文字居中显示
9. label.textAlignment = UITextAlignmentCenter;
10. //自动折行设置
11. label.lineBreakMode = UILineBreakModeWordWrap;
12. label.numberOfLines = 0;