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.
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.
In your application plist file add a "Initial interface orientation" row and specify desired initial orientation there.
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
#import < UIKit / UIKit.h >
@interface LandscapeViewController : UIViewController {
UIStatusBarStyle oldStatusBarStyle;
}
@end
#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...