Hello
I have an app with two views. Suppose viewcontroller A and viewcontroller B. In iPhone 3G, app launches with View A and then after a delay of 3 seconds, view B comes up.
But in iPhone 4, app always launches with view B.
I have set the UIApplicationExitsOnSuspend to YES for always starting from view A.
But view A never shows up in iPhone 4.
On simulator everything works fine.This behavior on the device has been noticed during testing via ad-hoc distribution. Hence I am unable to debug it.
Here is the code:
In the appDelegate implementation, am calling the first view as:
view did load of ViewControllerA:
Using IB in viewControllerA.xib, I have put up an UIImageView.
Whenever the app loads up in the device, instead of viewControllerA, always viewControllerB shows up.
Thanks
I have an app with two views. Suppose viewcontroller A and viewcontroller B. In iPhone 3G, app launches with View A and then after a delay of 3 seconds, view B comes up.
But in iPhone 4, app always launches with view B.
I have set the UIApplicationExitsOnSuspend to YES for always starting from view A.
But view A never shows up in iPhone 4.
On simulator everything works fine.This behavior on the device has been noticed during testing via ad-hoc distribution. Hence I am unable to debug it.
Here is the code:
In the appDelegate implementation, am calling the first view as:
Code:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[[UIApplication sharedApplication] setStatusBarHidden:YES
withAnimation:UIStatusBarStyleDefault];
ViewControllerA *avc=[[ViewControllerA alloc]initWithNibName:@"ViewControllerA" bundle:nil];
[window addSubview:avc.view];
[window makeKeyAndVisible];
return YES;
}
view did load of ViewControllerA:
Code:
- (void)viewDidLoad {
[NSThread sleepForTimeInterval:3.5];
viewControllerB *bvc=[[viewControllerB alloc]initWithNibName:@"viewControllerB" bundle:nil];
[self.view addSubview:bvc.view];
[super viewDidLoad];
}
Using IB in viewControllerA.xib, I have put up an UIImageView.
Whenever the app loads up in the device, instead of viewControllerA, always viewControllerB shows up.
Thanks