iOS label的换行符\n

    UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(20, 450, 320 - 20, 45)];

    [label setTextColor:[UIColorblackColor]];

    [label setText:@"图片不会被拉伸。\n设置按钮上的图片"];

    [label setFont:[UIFont boldSystemFontOfSize:15]];

    label.textAlignment = NSTextAlignmentLeft;

    label.numberOfLines = 0;

    [self.view addSubview:label];




转载请注明出处:http://blog.csdn.net/sevenquan


你可能感兴趣的:(iOS,-,UIKit框架)