在xcode5下设置两个viewController跳转——关键是禁用arc
1、禁用arc
2、然后使用如下代码:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; GuideViewController *myGuideVC = [[GuideViewController alloc]initWithNibName:@"GuideViewController" bundle:nil]; ADViewController *myADVC = [[ADViewController alloc]initWithNibName:@"ADViewController" bundle:nil]; [self.window addSubview:myADVC.view]; [self.window addSubview:myGuideVC.view]; //用户在此页面点击确定,则会[self removeSuperView] ,展现 myADVC.view
[self.window makeKeyAndVisible]; return YES;
}