2014-09-27 97 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