- (void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
NSLog(@"--%f", kScreenHeight);
// 返回后还要恢复 self.tabBarController.tabBar.frame = CGRectMake(0, kScreenHeight - 49, kScreenWidth, 49);
}
- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
// 写这个就可以解决
self.tabBarController.tabBar.frame = CGRectZero;
}
本文介绍了一种解决iOS应用中底部TabBar在特定情况下消失的问题的方法。通过在viewWillAppear方法中设置tabBar的frame为CGRectZero来实现。此方案适用于需要确保TabBar始终正确显示的情况。
1125

被折叠的 条评论
为什么被折叠?



