iOS 圆形图片

UIImageView *images = [[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 200, 200)];
    images.backgroundColor = [UIColor redColor];
    images.image = [UIImage imageNamed:@"1213"];
    images.layer.masksToBounds = YES;
    images.layer.cornerRadius = CGRectGetHeight(images.bounds)/2;
    images.layer.borderWidth = 2.0f;
    images.layer.borderColor = [[UIColor lightGrayColor]CGColor];

你可能感兴趣的:(ios,图片)