设置UIImageView 圆角

UIImageView*icon = [[UIImageViewalloc]initWithFrame:CGRectMake(WIDTH_SCREEN/2-75,20,150,150)];
icon.image= [UIImageimageNamed:@"[email protected]"];
icon.layer.masksToBounds=YES;//设置圆角必须设置此属性
icon.layer.cornerRadius=30.0f;

你可能感兴趣的:(设置UIImageView 圆角)