I have code to rotate and size a scrollview, such that when the iPhone is landscape the orientation is correct.
This is what the view looks like before rotating:
The scroll view is in yellow.
This is what it looks like after:
This is the log statement i put after setting the new frame for the scroll view, and you can see that it is clearly not what it says its supposed to be!
CGRect for object after setting to new: UIScrollView, {{0, 100}, {480, 150}}
[UIView animateWithDuration:kAnimationDuration animations:^{
CGRect boundsRect = anObject.frame;
boundsRect.origin.x = x;
boundsRect.origin.y = y;
boundsRect.size.width = width;
boundsRect.size.height = height;
anObject.frame = boundsRect;
NSLog(@"CGRect for object after setting to new: %@, %@",[anObject class], NSStringFromCGRect(anObject.frame));
} completion:^ (BOOL finished){
if (finished) {
[UIView animateWithDuration:kAnimationDuration animations:^{
anObject.alpha = 1.0;
}];
}
}];
What am i missing?
Thanks