単純な-些細な-UIViewの親/子階層があります。1つの親(UIView)。1つの子(UIButton)。親の境界は子の境界よりも小さいため、子の一部は親の境界ボックスを超えて拡張されます。
問題は次のとおりです。親のbboxの外側にある子の部分は、タッチを受け取りません。親のbbox内をタップするだけで、子ボタンがタッチを受け取ることができます。
誰かが修正/回避策を提案できますか?
アップデート
この質問に続く人のために、@Bastiansの最も優れた回答の結果として私が実装したソリューションは次のとおりです。
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event {
BOOL isInside = [super pointInside:point withEvent:event];
// identify the button view subclass
UIButton *b = (UIButton *)[self viewWithTag:3232];
CGPoint inButtonSpace = [self convertPoint:point toView:b];
BOOL isInsideButton = [b pointInside:inButtonSpace withEvent:nil];
if (isInsideButton) {
return isInsideButton;
} // if (YES == isInsideButton)
return isInside;
}