UILabel 设置圆角
UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake((ScreenWidth - 245)*0.5, 178, 245, 164)];
label.layer.cornerRadius = 13.0;
label.text = @"恭喜你,密码修改成功";
label.textAlignment = NSTextAlignmentCenter;
label.backgroundColor = [UIColor whiteColor];
[label setFont:[UIFont systemFontOfSize:18]];
这样直接设置圆角半径是不可以的,需要另行设置 label.clipsToBounds = YES;

浙公网安备 33010602011771号