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.
http://stackoverflow.com/questions/...ven-location-in-pixels-or-in-another-specific https://developer.apple.com/library...ptual/Devpedia-CocoaApp/CoordinateSystem.html ... You express a point in this coordinate space as a pair of floating-point numbers in user-space units, which are unpinned to any units in device space such as pixels. Drawing almost always occurs in the sector of a coordinate space where both x-axis and y-axis values are positive.
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.