图片分割

- (UIImage *)clipImage: (UIImage *)image inRect: (CGRect) rect

{//返回image中rect范围内的图片

    CGImageRef imageRef = CGImageCreateWithImageInRect(image.CGImage, rect);

    UIImage *subImage = [UIImage imageWithCGImage:imageRef];

    return subImage;

}

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