I have an image (small button) which looks perfect in Portrait Orientation, but my whole App is running in Landscape Right mode, however the image does not change to landscape.
I want to do it programmatically
I tried:
NSString *pathToImg = [[NSBundle mainBundle] pathForResource:@"DetonatorSmall" ofType:@"png"];
UIImage *img = [UIImage imageWithContentsOfFile:pathToImg];
UIImageView *imgView = [[UIImageView alloc] initWithImage:img];
imgView.transform = CGAffineTransformMakeRotation(3.14159265/2);
[button setImage:imgView.image forState:UIControlStateNormal];
But the image is still in portrait.
Any ideas what I can do?
Try This: