I'm really confused as to how iOS Ruler apps currently on the market are compatible with different size devices. An example is shown at the bottom.
After researching, I had come to the conclusion that getting the PPI of the current screen in realtime was impossible, which makes it impossible to programmatically draw a ruler.
My query is how do these ruler apps accurately display a ruler without being able to get the device PPI?
My first thought would be that the PPI and screen size for each device is hard-coded into the app. This seems like a lot of effort and a recipe for a million mistakes. Is this really how they have to do it? It would need to be tested on each different device to ensure it works correctly. I only have access to my iPhone 5S. Might they have different images of rulers for each different device? This would take up a lot of space on the phone.
I've seen similar questions on SO about drawing rulers, but (correct me if I'm wrong) they don't seem to have a solution for maintaining accuracy for different screen sizes and PPI. They all seem to say "it's impossible". If it's impossible, how is it done?