0

That's because all the code seems to just use the old iPad 1 and iPad 2 coordinate values, be it for drawing for the touch events. How do we use the "new values" for higher resolution?

skaffman
  • 398,947
  • 96
  • 818
  • 769
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
  • There should be [no difference](http://stackoverflow.com/q/9729711/1207152)? So can you be more specific about your problem? What is not working? – sch Apr 24 '12 at 10:31
  • isn't it true that on the Retina display, I can draw a line that is 3 pixel width, or 4, or 5 pixel width, and they will look different, versus on iPad 2, there is no such granularity – nonopolarity Apr 24 '12 at 10:34
  • 2
    No the CGFloats you set height, width etc. with are not "pixels". They are some sort of logic points. On the old displays 1 point = 1 pixel, but on the retina ones it's 1 point = 2 pixel. By that you don't have to change code to support new displays, but only add hi-res graphics. – Kai Huppmann Apr 24 '12 at 11:11
  • I see, so all the CGPoint, CGRect, CGSize, and other graphics element classes are all using Float, so the granularity can be achieved... would you put in as an answer so I will accept it as an answer? – nonopolarity Apr 24 '12 at 17:01

1 Answers1

1

So Kai (in the question's comments) is kind enough to point out that by using floating point numbers, we are able to achieve the precision, so that we can program an iPad 2 and the New iPad if we give it the same coordinate and it will fill up the screen, but if we use floating point we can achieve the extra precision and make use of the higher resolution.

nonopolarity
  • 146,324
  • 131
  • 460
  • 740