I am trying to customize a calendar program (originally written for the iPhone) I found (http://code.google.com/p/iphonecal/) to work on the iPad. It was written using .xib files for the controller and the UIView.
For some reason, it does not “fire” touchesEnded anywhere on the right 2/3 of the entire view. It works fine when using the iPhone simulator, but not the iPad simulator.
It was my understanding that touchesEnded monitors the entire view, but doesn’t appear to be doing so in this case.
Any ideas of what could be causing this?
UPDATE: it’s back… I reset the simulator, did a clean, re-build and the problem is back. Here is the code that doesn’t even get touched by the right-hand side of the 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];
}
I found the problem… both of the .xib files were not set up to use the iPad… I found the answer here, which showed me how to change the source code for the .xib files… it now works like a champ!