Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

chrono1081

macrumors G3
Original poster
Jan 26, 2008
8,772
5,421
Isla Nublar
Hi guys,

I have a prototype I'm working on and I've run into a strange issue. My screen resolution is set to that of the iPhone 6 4.7 inch in portrait mode (750, 1334) pixels however my gesture recognizer doesn't see that resolution.

For example if I touch in the middle of the screen I expect a value close to 375, instead I get a value around 187. My guess is that the coordinate system is somehow different on retina screens but I'm not sure.

Has anyone seen this? Does anyone know how to get the screen pixel values of the touch or the width of the screen in points instead of pixels?
 
Because you indeed get back result in points. And that is better. Why? Because swift/ ooc is smart enough to deteck which phone you are using and will do automatic conversion.
 
Thanks guys!

@Boris Unless I'm doing something wrong I haven't found this to be the case. Every time I switch devices my game loses chunks of the screen here and there. I found it much more consistent to detect the screen bounds and work from there.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.