iPadで動作するように見つけた(http://code.google.com/p/iphonecal/)カレンダープログラム(元々はiPhone用に作成されたもの)をカスタマイズしようとしています。これは、コントローラーと UIView の .xib ファイルを使用して作成されました。
何らかの理由で、ビュー全体の右 2/3 のどこにもtouchesEndedが「発生」しません。iPhone シミュレーターを使用すると問題なく動作しますが、iPad シミュレーターを使用するとうまくいきません。
touchesEndedがビュー全体を監視していることは私の理解でしたが、この場合は監視していないようです。
これを引き起こしている可能性のあるアイデアはありますか?
更新:戻ってきました...シミュレーターをリセットし、クリーンアップして再構築したところ、問題が再発しました。UIView の右側に触れていないコードは次のとおりです。
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//-- touchesEnded
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- (void) touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
int width = self.frame.size.width;
UITouch* touch = [touches anyObject];
CGPoint touchPoint = [touch locationInView:self];
//UIView* theview=[self hitTest:touchPoint withEvent:event];
if(touchPoint.x < 40 && touchPoint.y < headHeight)
[self movePrevMonth];
else if(touchPoint.x > width - 40 && touchPoint.y < headHeight)
[self moveNextMonth];
else if(touchPoint.y > headHeight)
[self touchAtDate:touchPoint];
}