我將uiimageview作爲子視圖添加到tabbarcontroller.view。當我推到其他viewcontroller tabbar得到隱藏,但圖像添加到tabbarcontroller出現。 請幫我在推送到其他視圖控制器時刪除imageview。隱藏Imageview
imgV=[[UIImageView alloc]initWithFrame:CGRectMake(0, 428, 320, 48)];
tabBarController = [[UITabBarController alloc] init];
tabBarController.moreNavigationController.navigationBar.barStyle = UIBarStyleBlackOpaque;
tabBarController.moreNavigationController.topViewController.view.backgroundColor=[UIColor clearColor];
tabBarController.delegate=self;
// tabBarController.selectedIndex = 0;
UIImage *img = [UIImage imageNamed: @"home_selected.png"];
[imgV setImage:img];
// [imgV setAlpha:0.5];
[self.tabBarController.view addSubview:imgV];
[self.tabBarController.view bringSubviewToFront:imgV];
當推到其他視圖 - 控制
-(void)logoutBtnTap
{
appDelegate.enterLogout=YES;
for(UIImageView *view in[self.view subviews])
{
[view removeFromSuperview];
}
Login_iPhone *controller=[[Login_iPhone alloc]init];
[controller setHidesBottomBarWhenPushed:YES];
[acctExec_iPhone.imgV removeFromSuperview];
acctExec_iPhone.imgV.hidden=YES;
[self.navigationController pushViewController:controller animated:YES];
[controller release];
}