当我单击后退按钮时,我正在加载一个特定的视图。但是对于那个特定的视图,我必须添加一个 tabbarController。我该怎么做..?当我尝试添加它时,它没有被添加..无法理解 y ?
-(IBAction)switchtofirst {
AppViewController *first=[[AppViewController alloc] initWithNibName:@"AppViewController" bundle:nil];
Login *second=[[Login alloc]initWithNibName:@"Login" bundle:nil];
second.title=@"Login";
NSArray *viewArray=[[NSArray alloc] initWithObjects: first,second,nil];
tabBarController=[[UITabBarController alloc] init];
[tabBarController setViewControllers:viewArray animated:NO];
AppViewController *gp=[AppViewController alloc];
[gp.view addSubview:tabBarController.view];
[self presentModalViewController:gp animated:NO];
[gp release];
}