Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法将触摸转发到附加了手势识别器的子视图,并且转发的事件将启动手势识别器?
我得到了它的一些解决方法(可能并不适合所有情况......)。 因为 UIGestureRecognizers 在 UIViews 之前从 sendEvent 方法中获取它们的事件,所以我在外部视图上创建了一个自定义的“ForwarderGestureRecognizer”,这个视图所做的就是在需要时将事件转发给子视图视图的识别器。