Posted by admin on Sep 2, 2010 in iPod / iPhone |

In an iPhone app I’m working on which uses an MKOverlayView subclass, I found that the lines I was drawing were thinner on iPhone 4 than on iPhone. Simple math to the rescue so the line has the same thickness on both platforms (e. g. I want a uniform lineWidth of 3.0):

overlayView.lineWidth = 3.0 * [[UIScreen mainScreen] scale];

Comments are closed.

Copyright © 2017 Standalone Code LLC All rights reserved. Theme by Laptop Geek.