SJFullscreenPopGesture
SJFullscreenPopGesture copied to clipboard
push到下一个控制器时,隐藏tabBar,手势返回过程中tabBar为什么是空白的
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated { if (self.childViewControllers.count > 0) { viewController.hidesBottomBarWhenPushed = YES; } }
我在你的demo里用代码写了UITabBarController,替代了stroyboard,能复现这个问题,好像截屏截不到Tabbar
if (!nav.tabBarController.tabBar.isHidden) {
CGRect tabFrame = (CGRect){nav.tabBarController.tabBar.frame.origin.x, nav.tabBarController.tabBar.frame.origin.y - 1, nav.tabBarController.tabBar.frame.size};
UIView *tabShot = [nav.view.window resizableSnapshotViewFromRect:tabFrame afterScreenUpdates:NO withCapInsets:UIEdgeInsetsZero];
tabShot.frame = tabFrame;
[_rootView addSubview:tabShot];
}
添加了如上代码对tabBar进行截图解决了这个问题
👌
👌
我好奇的是为什么你的demo里,用storyBord在手势返回时可以看到tabBar,用代码写的就不行
显示模式默认走的是截图, tabbar也会被截取到.