absentia
By: a guest | Mar 17th, 2010 | Syntax:
C | Size: 1.07 KB | Hits: 43 | Expires: Never
if (interfaceOrientation == UIDeviceOrientationPortrait) {
NSLog(@"MJPVC portrait");
[UIView beginAnimations:@"p" context:nil];
[UIView setAnimationDuration:0.4];
[UIView setAnimationDelegate:self];
CGAffineTransform transform = CGAffineTransformIdentity;
// transform = CGAffineTransformConcat(transform, CGAffineTransformMakeRotation(M_PI/2));
// transform = CGAffineTransformConcat(transform, CGAffineTransformMakeTranslation(-170,-100));
// transform = CGAffineTransformConcat(transform, CGAffineTransformMakeScale(0.75, 0.75));
self.view.transform = transform;
[UIView commitAnimations];
CGRect f;
f = self.view.frame;
f.size.height = 1024;
f.size.width = 768;
self.view.center = CGPointMake(1024/42, 768/2);
self.view.frame = f;
NSLog(@"scrollview frame x=%f, y=%f, w=%f, h=%f", f.origin.x, f.origin.y, f.size.width, f.size.height);
CGSize s = ((UIScrollView*)self.view).contentSize;
// s.height = 4000;
((UIScrollView*)self.view).contentSize = s;
NSLog(@"scrollview content size w=%f, h=%f", s.width, s.height);