图片圆角

- (void)drawcornder {

    UIImage *image = [UIImage imageNamed:@"image1"];

    

    // Begin a new image that will be the new image with the rounded corners

    // (here with the size of an UIImageView)

    UIGraphicsBeginImageContextWithOptions(_image.bounds.size, NO, 1.0);

    

    // Add a clip before drawing anything, in the shape of an rounded rect

    [[UIBezierPath bezierPathWithRoundedRect:_image.bounds

                                cornerRadius:10.0] addClip];

    // Draw your image

    [image drawInRect:_image.bounds];

    

    // Get the image, here setting the UIImageView image

    _image.image = UIGraphicsGetImageFromCurrentImageContext();

    

    // Lets forget about that we were drawing

    UIGraphicsEndImageContext();

}

原文地址:https://www.cnblogs.com/lihaibo-Leao/p/5552271.html