SloppySwiper
是一个 UINavigationController
代理,允许从屏幕上任何位置(不仅是左侧边缘)开始滑动返回手势。
interactivePopGestureRecognizer
时相同hidesBottomBarWhenPushed
没有被正确地动画化-(BOOL)sloppySwiperShouldAnimateTabBar:(SloppySwiper *)swiper
的调用返回 NO。SloppySwiper
可以通过 Interface Builder 或代码设置。IB 使用方法请参阅示例项目(在 Main.storyboard
中的 Navigation Controller Scene
)。您也可以按照以下方式编程设置:
#import "SloppySwiper.h"
...
@property (strong, nonatomic) SloppySwiper *swiper;
...
self.swiper = [[SloppySwiper alloc] initWithNavigationController:navigationController];
navigationController.delegate = self.swiper;
要运行示例项目;克隆仓库,然后首先从 Example 目录运行 pod install
。或者,您可以从命令行运行 pod try SloppySwiper
。
Arkadiusz Holko
我要感谢