高效设置UIimageView圆角

UIGraphicsBeginImageContextWithOptions(self.companyImg.bounds.size, NO, [UIScreen mainScreen].scale);
        [[UIBezierPath bezierPathWithRoundedRect:self.companyImg.bounds cornerRadius:self.companyImg.bounds.size.width/2] addClip];
        [image drawInRect:self.companyImg.bounds];
        self.companyImg.image = UIGraphicsGetImageFromCurrentImageContext();
        UIGraphicsEndImageContext();

你可能感兴趣的:(高效设置UIimageView圆角)