Launch iPhone in landscape mode

In this series of iPhone application development tutorial, you’ll learn launching your iPhone app in landscape mode. Believe me it’s very simple to change your iphone app in landscape mode. Just follow the given steps…
Step 1
Create a new view based project and right click the .plist file that resides in the Resources folder of the application.

It’ll show you some options.. but you just need to open that file into source code format. So, choose ->Open As->Source code.
Step 2
Now it’s time to edit the code. Just copy and paste the given code in the last (just above the </dict>)


Once you done with edit, just run your application and you will find that your iphone application is opening in landscape mode. to do something more like Enable autorotation ect… follow the given steps.
Step 3
In AppDelegate.m file add the given code in

applicationDidFinishLaunching method.
application.statusBarOrientation = UIInterfaceOrientationLandscapeRight
In ViewController.m file uncomment the given code and add return (interfaceOrientation == UIInterfaceOrientationLandscapeRight); just like given code.
// Override to allow orientations other than the default portrait orientation.
– (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
    // Return YES for supported orientations
     return (interfaceOrientation == UIInterfaceOrientationLandscapeRight);

Step 4
Build and run your application to see if it’s working properly or not. It must look like the given Image.

Download Code for the Iphone landscape mode

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>