In an iPhone/iPad App that am developing, am rotating an imageview with this code:
if (myOrientation == UIInterfaceOrientationPortrait) {
NSLog(@"portrait");
self.imageViewPic.transform = CGAffineTransformMakeRotation(degreesToRadians(0));
self.imageViewPic.bounds = CGRectMake(0.0f, 0.0f, [[UIScreen mainScreen] bounds].size.width, [[UIScreen mainScreen] bounds].size.height);
self.imageViewPic.center = CGPointMake(([[UIScreen mainScreen] bounds].size.height)/2, ([[UIScreen mainScreen] bounds].size.width)/2);
[self.imageViewPic setFrame:CGRectMake(0.0,0.0,[[UIScreen mainScreen] bounds].size.width,[[UIScreen mainScreen] bounds].size.height)];
self.imageViewPic.image = self.picture;
self.imageViewBarTop.transform = CGAffineTransformMakeRotation(degreesToRadians(0));
self.buttonHome.transform = CGAffineTransformMakeRotation(degreesToRadians(0));
....
}
The imageViewPic (which is full-screen sized) does rotate, but then it occurs almost a minute 'after' I actually rotate the device (iPhone/iPad), whereas, in contrast, the other components in the screen (for example, imageViewBarTop -> which is a bar on the top of the screen, buttonHome -> which is a 'home' button) rotate instantly on rotation of the device. Why is the rotation of the imageViewPic taking so long (even though its code is actually before the code that rotates other components)? Is it because the imageViewPic occupies the entire screen? Any help is gretly appreciated.