tags:

views:

46

answers:

3

I want to create a Iphone Application. My aim is, it will be contains Landscape view only from loading time. How to disable portrait view from loading time. If anybody know any idea, please help me.

Thanks.

+1  A: 

In your application plist file add a "Initial interface orientation" row and specify desired initial orientation there.

Vladimir
Thanks for your reply. It is useful to rotate the menu controls only. It is not used to rotate the View control.
Velmurugan
to rotate views you need to implement shouldAutorotateToInterfaceOrientation method in your viewcontrollers and return YES for landscape orientation from it
Vladimir
I used the above answers for my application. and then i made some correction by using the following link... http://www.dejoware.com/blogpages/files/iphone_programming_statusbarless_landscapeonly_utility_app.php
Velmurugan
A: 

requires apple login

Start my application in landscape mode?

IN your plist file

 <key>UIInterfaceOrientation</key>
    <string>UIInterfaceOrientationLandscapeRight</string>

additional information

http://developer.apple.com/library/ios/#qa/qa2010/qa1588.html

Aaron Saunders
A: 

Finally i get the following answer..

LandscapeViewController.h

#import < UIKit / UIKit.h >

@interface LandscapeViewController : UIViewController {

UIStatusBarStyle oldStatusBarStyle;

}

@end


LandscapeViewController.m

     #import "LandscapeViewController.h"

@implementation LandscapeViewController

    - (void)viewDidLoad {

[super viewDidLoad];

}

  - (void)viewWillAppear:(BOOL)animated

{ [super viewWillAppear:animated];

oldStatusBarStyle = [[UIApplication sharedApplication] statusBarStyle];

[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackTranslucent animated:NO];

}

   - (void)viewWillDisappear:(BOOL)animated

{ [super viewWillDisappear:animated];

[[UIApplication sharedApplication] setStatusBarStyle:oldStatusBarStyle animated:NO];    

}

  - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation

{

return (interfaceOrientation==UIInterfaceOrientationLandscapeRight);

NSLog(@"DDDDDDDDD");

}

  - (void)didReceiveMemoryWarning 

{ [super didReceiveMemoryWarning]; }

  - (void)dealloc 

{

[super dealloc];

} @end


and refer the following link do that steps...

http://www.dejoware.com/blogpages/files/iphone_programming_statusbarless_landscapeonly_utility_app.php

Velmurugan