I have been converting over an iphone app to be optimized for the ipad display and have run into a strange error. The ipad simulator only registers touch events within the top left 320x480 pixels of the ipad screen. Within this region everything works perfectly outside here no touch events are occurring.
I am using the following function to capture and display the touch events in an NSlog
-(void) touchesBegan
NSSet *)touches withEvent
UIEvent *)event{
UITouch *touch=[touches anyObject];
CGPoint location = [touch locationInView:self.view];
int tX =(location.x);
int tY =(location.y);
NSLog(@"\t [%d,%d] ",tX,tY);
}
The main UIView was defined to be the correct (0,0,768,1024) and within the touch events call the size registers with a bounding box size of 768x955 which seems about right since my main screen has a tabbar.
Is there somewhere in the new Xcode 3.2/4.0 that the screen size is being set which is limiting the touch events for the ipad to the iphone viewable area?
Just to forestal other possibilities, the app is targeted to an ipad/iphone universal app, but has the same behavior if targeted to only ipad. Also the app works perfectly in the iphone v4.0 simulator since the viewable area is in that case correct.
It seems like Xcode must be setting the viewable area in a default somewhere but I don't see anything like that.
Any help would be greatly appreciated.
Cheers,
RC
PS One other possibly pertinent piece of information, when running the ipad simulator, it correctly shows the ipad screen, but says iphone simulator at the top not ipad.
I am using the following function to capture and display the touch events in an NSlog
-(void) touchesBegan
UITouch *touch=[touches anyObject];
CGPoint location = [touch locationInView:self.view];
int tX =(location.x);
int tY =(location.y);
NSLog(@"\t [%d,%d] ",tX,tY);
}
The main UIView was defined to be the correct (0,0,768,1024) and within the touch events call the size registers with a bounding box size of 768x955 which seems about right since my main screen has a tabbar.
Is there somewhere in the new Xcode 3.2/4.0 that the screen size is being set which is limiting the touch events for the ipad to the iphone viewable area?
Just to forestal other possibilities, the app is targeted to an ipad/iphone universal app, but has the same behavior if targeted to only ipad. Also the app works perfectly in the iphone v4.0 simulator since the viewable area is in that case correct.
It seems like Xcode must be setting the viewable area in a default somewhere but I don't see anything like that.
Any help would be greatly appreciated.
Cheers,
RC
PS One other possibly pertinent piece of information, when running the ipad simulator, it correctly shows the ipad screen, but says iphone simulator at the top not ipad.