changsanjiang / SJFullscreenPopGesture

Fullscreen pop gesture. OC&Swift. It is very suitable for the application of the video player. Support `cocoapods`. 只需`pod`即可自带全屏返回手势. 支持pod. 支持OC&Swift.
MIT License
283 stars 38 forks source link

push到下一个控制器时,隐藏tabBar,手势返回过程中tabBar为什么是空白的 #12

Open carlchou00 opened 5 years ago

carlchou00 commented 5 years ago

我在你的demo里用代码写了UITabBarController,替代了stroyboard,能复现这个问题,好像截屏截不到Tabbar

Screen Shot 2019-04-13 at 16 24 01 Screen Shot 2019-04-13 at 16 23 29
carlchou00 commented 5 years ago
        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进行截图解决了这个问题

changsanjiang commented 5 years ago

👌

carlchou00 commented 5 years ago

👌

我好奇的是为什么你的demo里,用storyBord在手势返回时可以看到tabBar,用代码写的就不行

changsanjiang commented 5 years ago

显示模式默认走的是截图, tabbar也会被截取到.

image