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.
ジェスチャレコグナイザーが接続されているサブビューにタッチを転送する方法はありますか?また、転送されたイベントによってジェスチャレコグナイザーが開始されますか?
ちょっとした回避策で動作するようになりました(すべての場合に適しているとは限りません...)。 UIGestureRecognizer は、UIView より先に sendEvent メソッドからイベントを取得するため、外側のビューにカスタム 'ForwarderGestureRecognizer' を作成しました。このビューが行うことは、必要に応じてサブビュー ビューのレコグナイザーにイベントを転送することだけです。