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

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

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

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Tutorials > Tutorial Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 09-29-2009, 06:31 AM   #1 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 5
appchogie is on a distinguished road
Default Landscape application help.

Hi guys just a quick thread to ask about landscape within apps. i have made a app that I wish to always run in landscape (left). I can get the status bar to load in landscape but I cant get my app to load in landscape and it loads in portrait cutting half of the screen even tho i have built the UI in landscape within interface builder.

I am sure that I am missing code somewhere any help would really be great.

Thank you.
appchogie is offline   Reply With Quote
Old 09-29-2009, 08:01 AM   #2 (permalink)
Game Developer
 
Join Date: Jul 2009
Location: Austria
Posts: 65
nitrorazor is on a distinguished road
Default

Put this in your viewController.m file:

Code:
-(BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    return (interfaceOrientation == UIInterfaceOrientationLandscapeLeft);
}
nitrorazor is offline   Reply With Quote
Old 09-29-2009, 11:27 AM   #3 (permalink)
Registered Member
 
Join Date: Sep 2009
Posts: 5
appchogie is on a distinguished road
Default Thank you

Hello thank you very much it worked perfect first time.

Cheers.
appchogie is offline   Reply With Quote
Old 09-29-2009, 04:26 PM   #4 (permalink)
Beast Iphone Developor
 
justill45's Avatar
 
Join Date: Aug 2009
Location: Atlanta, Georgia
Age: 16
Posts: 1,302
justill45 is on a distinguished road
Default

Quote:
Originally Posted by appchogie View Post
Hello thank you very much it worked perfect first time.

Cheers.
also, u have to change it to landscape in info.plist also. in info,plist, click on the first tab, press the button on the side, press the plus sign, type in " UIInterfaceOrientation" <===== CASE SENSITIVE . change it to the landscape way u want
justill45 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
» Online Users: 448
17 members and 431 guests
Dj_kades, givensur, iekei, IOOIOIO, IphoneSdk, jeroenkeij, john love, karatebasker, mediaspree, peterwilli, pipposanta, Punkjumper, QuantumDoja, SLIC, Sloshmonster, sojourner, usernametaken
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,696
Threads: 94,139
Posts: 402,959
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jasper_muc
Powered by vBadvanced CMPS v3.1.0

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