Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Mockup & CodeGen, iPhone & iPad
($9.99)

Make your own iPhone apps
and run them live!
(free)

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 12-16-2008, 01:01 PM   #18 (permalink)
Forsworn
Registered Member
 
Forsworn's Avatar
 
Join Date: Oct 2008
Location: Germany
Posts: 504
Default

Sorry for this many bumps but it's important and others will need this, too:

It didn't compile without this:
Code:
#define degreesToRadian(x) (M_PI * x / 180.0)
Only rotate a single view:
Code:
- (void)viewWillAppear:(BOOL)animated {	
	_originalTransform = [self.view transform];
	_originalBounds = [self.view bounds];
	_originalCenter = [self.view center];
	
	CGAffineTransform landscapeTransform = CGAffineTransformMakeRotation(degreesToRadian(90));
	landscapeTransform = CGAffineTransformTranslate (landscapeTransform, +80.0, +100.0);
	
	[self.view setTransform:landscapeTransform];
	
	self.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
	self.view.autoresizesSubviews = YES;
	self.view.bounds  = CGRectMake(0.0, 0.0, 480.0, 320.0);
	self.view.center  = CGPointMake (240.0, 160.0);
	
	[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeRight;
}

- (void) viewWillDisappear:(BOOL)animated {
	[self.view setTransform:_originalTransform];
	[self.view setBounds:_originalBounds];
	[self.view setCenter:_originalCenter];
	
	[UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationPortrait; 
}
It's working great but I get a problem with the original navigationbar:

Anyone else encountering the same problem?

regards
Forsworn is offline   Reply With Quote
 

» Advertisements
» Online Users: 267
16 members and 251 guests
ADY, ckgni, IphoneSdk, iph_s, jakerocheleau, karunaskj, MarkC, marshusensei, michelle, peterkessler45, rob.mccarthy, rodrigozanatta, Rudy, Speed, Xaron
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,877
Threads: 89,218
Posts: 380,695
Top Poster: BrianSlick (7,129)
Welcome to our newest member, peterkessler45
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 08:29 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.