iOS之UILabel换行符\n

    UILabel *tips = [[UILabel alloc]initWithFrame:CGRectMake(20, 16, kWidth - 20, 45)];
    [tips setTextColor:[UIColor grayColor]];
    [tips setText:@"支付密码必须为6位数字组合。\n您可依次进入 '功能列表' -> '安全中心' 修改支付密码。"];
    [tips setFont:[UIFont boldSystemFontOfSize:12]];
    tips.textAlignment = NSTextAlignmentLeft;
    tips.numberOfLines = 0; // 关键一句

猜你喜欢

转载自blog.csdn.net/LVXIANGAN/article/details/45050161
今日推荐