SloppySwiper 0.6

SloppySwiper 0.6

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2017年4月

Arkadiusz Holko 维护。



SloppySwiper 是一个 UINavigationController 代理,允许从屏幕上任何位置(不仅是左侧边缘)开始滑动返回手势。

注意

  • 该库重新创建了默认的弹出动画,因此它看起来并不完全与使用 interactivePopGestureRecognizer 时相同
  • 手势可能与其他 向右滑动 手势冲突
  • 如果您在包含在 UITabBarController 中的 UINavigationController 内遇到问题,导致 UITabBar 在动画过程中浮出视图,您需要实现 SloppySwiperDelegate 协议,并对于 -(BOOL)sloppySwiperShouldAnimateTabBar:(SloppySwiper *)swiper 的调用返回 NO。

Demo GIF

使用方法

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

要求

  • iOS 7
  • ARC

作者

Arkadiusz Holko

致谢

我要感谢