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 08-31-2008, 01:37 AM   #1 (permalink)
Opsive
Registered Member
 
Join Date: Aug 2008
Posts: 16
Default Force landscape mode in one view

Hello,

How do you force a view to be in landscape mode? I've tried the following code (which generates a warning), but it isn't working for me (in the view controller):

Code:
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil {
	if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) {
		// Initialization code
		[[UIDevice currentDevice] setOrientation:UIInterfaceOrientationLandscapeRight];
	}
	return self;
}
Thanks,
Justin
Opsive is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 158,798
Threads: 89,205
Posts: 380,608
Top Poster: BrianSlick (7,129)
Welcome to our newest member, Frasier2027
Powered by vBadvanced CMPS v3.1.0

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