I want to put an image into a CALayer's sublayer, like this:
CALayer *parent = [CALayer layer];
CALayer *child = [CALayer layer];
[parent addSublayer:child];
UIImage *image = [UIImage imageWithContentsOfFile:imagePaht];
NSLog(@"%f-%f", image.size.width, image.size.height);
child.contents = [image CGImage];
I have five images in my app to display, their sizes are (3648, 2048),(3648, 2048),(3648, 2048),(2048, 3648),(2048, 3648), but when the images are displayed, I found that the last two images were rotate 90 degree. anyone has such problem?