ChenYilong / CYLTabBarController

[EN]It is an iOS UI module library for adding animation to iOS tabbar items and icons with Lottie, and adding a bigger center UITabBar Item. [CN]【中国特色 TabBar】一行代码实现 Lottie 动画TabBar,支持中间带+号的TabBar样式,自带红点角标,支持动态刷新。【iOS13 & Dark Mode & iPhone XS MAX supported】
MIT License
6.9k stars 1.45k forks source link

[Q-A]使用方法询问: #571

Open 77521 opened 2 years ago

77521 commented 2 years ago



My issue:

我首页 跳转 push到下个控制器,右滑返回 不支持了,在其他界面 都是好的 首页没有导航栏。其他界面 也没有导航栏,方法都是一样的。就是 右滑不返回,点击返回按钮 能返回,只在首页会这样

ChenYilong commented 2 years ago

 疑似是属于系统bug, 在隐藏导航栏的情况下, 如果在滑动翻页手势可能出现错乱, 我提供了几个API用来规避:

请参考下面文件里的几个API:

https://github.com/ChenYilong/CYLTabBarController/blob/master/CYLTabBarController/UIViewController%2BCYLNavigationControllerExtention.h

/*!
 * 使用方法:用在viewWillDisappear/dealloc
 * 作用:在左滑动的过渡的时间段内禁用interactivePopGestureRecognizer
 */
- (void)cyl_disableInteractivePopGestureRecognizer;
/*!
 * use in viewDidDisappear
 * 作用:在左滑动的结束后启用interactivePopGestureRecognizer
 */
- (void)cyl_enableInteractivePopGestureRecognizer;