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

sdkIQ for iPhone
($4.99)

Your First iPhone App
($1.99)

iPhone Code Generator
($9.99)

Dual Matches
($0.99)

Calcuccino Programmers' Calculator
($2.99)

SDKtoday
(free)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-09-2010, 09:22 AM   #26 (permalink)
Registered Member
 
Join Date: Jun 2009
Posts: 133
Default ROTATES VIEW TO LANDSCAPE MODE AND SETS THE STAGE SIZE

What if I am setting this

Code:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
//====================================================
		//ROTATES VIEW TO LANDSCAPE MODE AND SETS THE STAGE SIZE
		CGAffineTransform rotate = CGAffineTransformMakeRotation(1.57079633);
		[window setTransform:rotate];
		
		CGRect contentRect = CGRectMake(0, 0, 480, 320); 
		window.bounds = contentRect; 
		[window setCenter:CGPointMake(160.0f, 240.0f)];
		//====================================================

}
This forces the app to be in landscape right (home button right)

But what if I need to keep this, and also support landscape left?

Could anyone help me figure this out?

Thanks
jbullfrog is offline   Reply With Quote
Old 04-28-2010, 12:08 PM   #27 (permalink)
Registered Member
 
Join Date: Apr 2010
Posts: 2
Default

Quote:
Originally Posted by jbullfrog View Post
What if I am setting this

Code:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
//====================================================
		//ROTATES VIEW TO LANDSCAPE MODE AND SETS THE STAGE SIZE
		CGAffineTransform rotate = CGAffineTransformMakeRotation(1.57079633);
		[window setTransform:rotate];
		
		CGRect contentRect = CGRectMake(0, 0, 480, 320); 
		window.bounds = contentRect; 
		[window setCenter:CGPointMake(160.0f, 240.0f)];
		//====================================================

}
This forces the app to be in landscape right (home button right)

But what if I need to keep this, and also support landscape left?

Could anyone help me figure this out?

Thanks
in the shouldAutorotateToInteraceOrientation insert the following code
return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft || interfaceOrientation == UIInterfaceOrientationLandscapeRight);
bbrownnc is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


» Advertisements
» Stats
Members: 41,860
Threads: 49,768
Posts: 213,052
Top Poster: BrianSlick (3,138)
Welcome to our newest member, gustavo7sexton
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 06:53 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0