我在视图控制器 1 中添加了这个标签栏,它运行良好,唯一的问题是我希望它执行以下功能[self.navigationController popViewControllerAnimated:YES];
,但在视图控制器 2 中,当标签栏按钮被触摸时。最好的行动方案是什么?
UINavigationController *homeNavigationController = [[UINavigationController alloc] initWithRootViewController:homeViewController];
homeNavigationController.tabBarItem = [[DSTabBarItem alloc] initWithFinishedSelectedImage:[UIImage imageNamed:@"home"]
finishedUnselectedImage:[UIImage imageNamed:@"home1"]
iconSize:CGSizeMake(76, 59)
tag:0];
[tabBarViewControllers addObject:homeNavigationController];