Closed mlch911 closed 2 years ago
https://github.com/HeathWang/HWPanModal/blob/3dde88f86d0b06b00be0ae992968bc42ddb06054/Sources/Mediator/HWPanModalPresentableHandler.m#L382
这里在isPresentedViewAnchored为NO,且scrollView.contentOffset.y大于0的时候,将scrollView的滚动停掉。
isPresentedViewAnchored
scrollView.contentOffset.y
我在shouldRespondToPanModalGestureRecognizer:里返回了NO,导致isPresentedViewAnchored为NO,这时候scrollViewbounce向上滑动后,就会除非这儿代码的halt,导致scrollViewbounce弹上去后不会回弹回来。
shouldRespondToPanModalGestureRecognizer:
scrollView
halt
我不太清楚这里代码起到了什么作用,想请问下,我注释这段代码后,达到了我想要的效果。
这部分代码是为了滑到顶部停止,比如你设置了只能滑动到某个高度
好的感谢
https://github.com/HeathWang/HWPanModal/blob/3dde88f86d0b06b00be0ae992968bc42ddb06054/Sources/Mediator/HWPanModalPresentableHandler.m#L382
这里代码的逻辑:
这里在
isPresentedViewAnchored
为NO,且scrollView.contentOffset.y
大于0的时候,将scrollView的滚动停掉。我遇到的问题:
我在
shouldRespondToPanModalGestureRecognizer:
里返回了NO,导致isPresentedViewAnchored
为NO,这时候scrollView
bounce向上滑动后,就会除非这儿代码的halt
,导致scrollView
bounce弹上去后不会回弹回来。我不太清楚这里代码起到了什么作用,想请问下,我注释这段代码后,达到了我想要的效果。