For example, the png file is 1200 (h) x 50 (w) pixels, how can I cut the png and loads in 6 UIImage
s, each 200 (h) x 50 (w). Thanks!
EDIT - thanks to Michal's answer, the final code:
CGImageRef imageToSplit = [UIImage imageNamed:@"huge.png"].CGImage;
CGImageRef partOfImageAsCG = CGImageCreateWithImageInRect(imageToSplit, CGRectMake(0, 0, 50, 50));
UIImage *partOfImage = [UIImage imageWithCGImage:partOfImageAsCG];
// ...
CGImageRelease(partOfImageAsCG);