IOS: How to split an UIImage into parts
问题 In one of my application I need to split UIImage into multiple parts. The following was the code I am using to split. Here my problem is I am unable to load the image view by adding the image to UIImageView. - (void)viewDidLoad { UIImage* image = [UIImage imageNamed:@"monalisa.png"]; NSMutableArray* splitImages = [self splitImageIntoRects:(__bridge CGImageRef)(image)]; printf("\n count; %d",[splitImages count]); CALayer *layer = [splitImages objectAtIndex:5]; CGImageRef imgRef = (__bridge