2014-09-27 128 views
2

我正在使用Xcode 5.1.2 iOS7.My的問題是,我想實現第二個視圖控制器上的標籤欄控制器。標籤欄控制器已成功實現。我的所有視圖都是稍微透明的,它將數組插入到標籤欄。當我單擊標籤欄按鈕時,第一個視圖在標籤欄views.so的每個視圖的後面都可見。我如何解決這個問題。uiview問題與標籤欄

tabbar=[[UITabBarController alloc]init]; 
       UIViewController *first=[[ViewController alloc]init]; 
       UIViewController *second=[[SearchViewController alloc]init]; 
       UIViewController *third=[[Party_partner_ViewController alloc]init]; 
       UIViewController *Fourth=[[My_GrooveViewController alloc]init]; 
       UIViewController *Fifth=[[More_ViewController alloc]init]; 
       UINavigationController *firstNavController = [[UINavigationController alloc] initWithRootViewController:first]; 
       UINavigationController *firstNavController1 = [[UINavigationController alloc] initWithRootViewController:second]; 
       UINavigationController *firstNavController2 = [[UINavigationController alloc] initWithRootViewController:third]; 
       UINavigationController *firstNavController3 = [[UINavigationController alloc] initWithRootViewController:Fourth]; 
       UINavigationController *firstNavController4 = [[UINavigationController alloc] initWithRootViewController:Fifth]; 
       NSArray *ver = [[UIDevice currentDevice].systemVersion componentsSeparatedByString:@"."]; 
       if ([[ver objectAtIndex:0] intValue] >= 7) { 
        self.nav.navigationBar.barTintColor = [UIColor colorWithRed:29/255.0f green:29/255.0f blue:29/255.0f alpha:1.0f]; 
        self.nav.navigationBar.translucent = NO; 
       }else 
       { 
        self.nav.navigationBar.tintColor = [UIColor colorWithRed:29/255.0f green:29/255.0f blue:29/255.0f alpha:1.0f]; 
       } 

       self.nav.navigationBar.topItem.title = @"The Groove"; 

        tabbar.viewControllers=[NSArray arrayWithObjects:firstNavController,firstNavController1, firstNavController2,firstNavController3,firstNavController4, Nil]; 

       AppDelegate *mainDelegate = (AppDelegate *)[[UIApplication sharedApplication]delegate]; 
       // UIWindow *window= [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; 
       [mainDelegate.window addSubview:tabbar.view]; 

回答

-1

肯定首先你可以隱藏或刪除您的UIView

+0

您可以張貼在評​​論不是作爲一個答案。請 – 2014-09-27 10:17:28