Can you guys tell why this code shows no image?
CALayer *layerBack = [CALayer layer];
addedObject = [[UIImage alloc]initWithContentsOfFile:[[NSBundle mainBundle]
pathForResource:[NSString stringWithFormat: @"%@%d", PREFIX, number] ofType:@"png"]];
layerBack.bounds=CGRectMake(0.0f,0.0f,selectedImage.size.height,selectedImage.size.width);
layerBack.position=CGPointMake(200,200);
layerBack.contents = (id)selectedImage.CGImage;
// in theory I think this line should be equal to selectedImage.CGImage, but when I do that, Xcode shows me an error!
[self.view.layer addSublayer:layerBack];
[layerBack display];
This Quartz stuff is driving me crazy! Please help!
Yes, the image is there and is working, but all I see after this code is a blank screen.