UIButton タッチを転送するためのこのコードが iOS5 で機能しなくなった理由を理解できないようです。
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesBegan:touches withEvent:event];
[self.nextResponder touchesBegan:touches withEvent:event];
}
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesMoved:touches withEvent:event];
[self.nextResponder touchesMoved:touches withEvent:event];
}
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
[super touchesEnded:touches withEvent:event];
[self.nextResponder touchesEnded:touches withEvent:event];
}
次のレスポンダーのタッチ メソッドをログに記録すると、移動したタッチは 1 回だけ転送され、終了したタッチはまったく転送されないことがわかります。iOS4 ではすべてのタッチが転送されるため、これは非常に予期しない動作です。どんな助けでも大歓迎です。