割图片的代码,在拼图游戏等领域用的到
UIImage *image = [UIImage imageNamed:@”aa.png”];CGImageRef imageRef =image.CGImage;CGImageRef image = CGImageCreateWithImageInRect (imageRef,rect);UIImage*newImage = [[UIImage alloc] initWithCGImage:image];