如何解决在表格视图单元格中隐藏标签栏单击
| 我在隐藏标签栏时遇到问题。 这是我的代码//this created in the Delegate.m file
-(void)HideTabBar
{
mTabController.hidesBottomBarWhenPushed =YES;
}
//Now i want to this on the cell select Tab bar must hide when it go to the map view (other view ) for that i use this but its working
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
journeyAppDelegate * journey = (journeyAppDelegate *)[[UIApplication sharedApplication]delegate];
[journey HideTabBar];
}
But
它工作如何做到这一点
解决方法
直到您按下mTabController,它才会变得不可见/隐藏:
//this created in the Delegate.m file
-(void)HideTabBar
{
mTabController.hidesBottomBarWhenPushed =YES;
[self.navigationController pushViewController:IncomingViewController animated:YES];
}
//Now i want to this on the cell select Tab bar must hide when it go to the map view (other view ) for that i use this but its working
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
JourneyAppDelegate * journey = (JourneyAppDelegate *)[[UIApplication sharedApplication]delegate];
[journey HideTabBar];
}
在调用pushViewController之前,需要将hidesBottomBarWhenPushed属性设置为将要推送的UIViewController。
,正如该方法建议的那样,它仅在将视图控制器推入堆栈时才起作用。因此,与其尝试在表视图所在的视图控制器中隐藏它,不如添加行
[mapController setHidesBottomBarWhenPushed: YES]
到创建该地图控制器的位置。
希望你理解我的工作。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。