Comments (9)
可以,我看下
@fuchenxi 确定抛出这一个代理方法就可以了吗?
from hwpanmodal.
我建议所有的都抛出。
因为复杂的手势需求这种代理都需要使用。 还有就是建议代理API可以优化更新个大版本了,这个库我也用了很多年了。整体使用感觉挺不错的,就是实现代理方法还是觉得有些啰嗦了。可以出一个类似于 UIAppearance
的全局配置项,适用于整体,控制器的方法,改成属性比如 :
vc.hw_pushAnimation.springDamping
vc.hw_popAnimation.springDamping
vc.hw_interaction
hw_pushAnimation
、 hw_popAnimation
、vc.hw_interaction
可以遵循某个协议,让客户端可以自定义实现。
-presentPanModal:
改成 hook 系统的 presentViewController:
, 使用自己的还是系统的,可以给控制器添加一个开关属性。
总的来说,就是 动画、手势、交互等都可以单独剥离开。现在在一个协议里确实越来越复杂啦。
只是建议~~~这是个大工程
from hwpanmodal.
拆分的协议越多,颗粒度是变小了,但是一般人刚入手理解使用也难度加大。
原本做的很简单,后面发现提的需求越来越多,一个协议就变得很大了。
我看看把所有的手势代理抛出来吧。
拆协议不确保不出bug,目前没这个计划,毕竟测试全靠同行。
from hwpanmodal.
pod 'HWPanModal', :git => 'https://github.com/HeathWang/HWPanModal.git'
我提交了,你看下能满足你的要求吗?没问题再发release
from hwpanmodal.
好的,我这两天忙完这个需求,我再测试下。完事告诉你
from hwpanmodal.
@HeathWang
四个手势全都抛出来了,是可行的。
之前的问题是模态出一个VC,里面嵌套一个横向滚动的CollectionView,会出现既可横向滚动CollectionView,也能纵向滚动Dimiss VC,主要是由于以下代码导致两个手势都可以识别。
目前我看是添加个协议HWPanModalPanGestureDelegate
,只要实现协议的方法,直接就return了。我不用做什么事情,默认就是我想要的功能。
HWPanModalPresentableHandler.m
/**
* ONLY When otherGestureRecognizer is panGestureRecognizer, and target gestureRecognizer is panGestureRecognizer, return YES.
*/
- (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer {
if ([gestureRecognizer isKindOfClass:UIPanGestureRecognizer.class]) {
return [otherGestureRecognizer isKindOfClass:UIPanGestureRecognizer.class];
}
return NO;
}
from hwpanmodal.
ok,那我发布新version
from hwpanmodal.
@fuchenxi
指定版本:0.9.5
from hwpanmodal.
好的。我更新一下
from hwpanmodal.
Related Issues (20)
- 请问下如何Avc push Bvc后,用Avc 的Nav push Cvc呢 HOT 2
- 里面有UIWebView 注释审核过不了 ,建议更新 HOT 1
- vc里面有两个子vc,子vc使用的是tableView,该怎么刷新呢 HOT 1
- present vc用navigation 包一层 HOT 2
- 'UIScrollView+Helper.h' file not found HOT 2
- Will the information be leaked? HOT 1
- App - 当在弹出控制器中添加类似今日头条的评论输入框组件后,tableview和底部组件之间会留间距 HOT 1
- presentPanModal后的控制器,添加VisualEffectView想实现虚化底部控制器view的效果无效 HOT 3
- 请问做下滑动画时,滑动到什么位置dismiss,这个参数可以自己设置吗,我没有找到 HOT 2
- swift 找不到 has no member 'contentShadow' HOT 2
- shouldEnableAppearanceTransition 导致push vc 问题
- 命名问题 HOT 2
- 蒙层的背景颜色,能不能支持自定义呀,现在搞成黑色,只能设置alpha太不灵活呀
- pickerview 滚动冲突怎么办? HOT 1
- showsScrollableVerticalScrollIndicator notwork
- allowsTouchEventsPassingThroughTransitionView 设置成true 返回问题 HOT 1
- 使用HWFullScreenNavController例子,如果子控制器是一个tableview,再次点击push新的子控制器之后,新子控制器的tableview不能滑动,pop上一个弹窗页面,也不能滑动
- 如何实现present的vc里面点击push到新的全屏页面 HOT 5
- iPad窗口缩放问题 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hwpanmodal.