我在應用程序委託中添加了標籤欄。當我從我的視圖中推入視圖時,te標籤欄被刪除。我也希望在推送的視圖上的標籤欄。刪除推視圖上的標籤欄
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions{
AudioViewController * audioViewController = [[AudioViewController alloc] initWithNibName:@"AudioViewController" bundle:nil];
audioViewController.title = @"audio";
audioViewController.tabBarItem.image=[UIImage imageNamed:@"audio 30x30.png"];
ViewController *videoViewController = [[ViewController alloc] initWithNibName:@"ViewController" bundle:nil];
videoViewController.title = @"video";
videoViewController.tabBarItem.image=[UIImage imageNamed:@"video 30x30.png"];
ViewController *aboutViewController = [[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];
aboutViewController.title = @"about";
aboutViewController.tabBarItem.image=[UIImage imageNamed:@"about1_iPhone.png"];
ViewController *infoViewController = [[ViewController alloc]initWithNibName:@"ViewController" bundle:nil];
infoViewController.title = @"info";
infoViewController.tabBarItem.image=[UIImage imageNamed:@"info 30x30.png"];
PlaylistViewController *PlaylistViewControllerObj = [[PlaylistViewController alloc]initWithNibName:@"PlaylistViewController" bundle:nil];
PlaylistViewControllerObj.title = @"Playlist";
PlaylistViewControllerObj.tabBarItem.image=[UIImage imageNamed:@"ko.png"];
NSArray *viewControllerArray = [NSArray arrayWithObjects:audioViewController,videoViewController,aboutViewController,infoViewController,PlaylistViewControllerObj,nil];
UITabBarController * myTabbarController = [[UITabBarController alloc] init];
[myTabbarController setViewControllers:viewControllerArray];
navigationControllerObj = [[UINavigationController alloc] initWithRootViewController:myTabbarController];
[navigationControllerObj setNavigationBarHidden:YES animated:NO];
self.window.rootViewController =navigationControllerObj;
}
這將有助於解釋你的代碼。 – 2013-03-01 13:34:36