这个问题困扰了我很久很久了,今天找到了一个解决方法,废话不多说,直接上代码!
UIImageView *tabBarView = [[UIImageView alloc] init];
NSString *imageName = @"tabBar-Final.png";
tabBarView.image = [UIImage imageNamed:imageName];
tabBarView.frame = self.tabBar.bounds;
tabBarView.userInteractionEnabled = YES;
[self.tabBar addSubview:tabBarView];
通过将自定义的tabBar直接加入系统系统自带的tabBar中,那么,在下一个要被push的界面的viewWillAppear里面设置
self.hidesBottomBarWhenPushed =YES;
即可达到效果,是不是很简单呢