iOS 4.0 contentScaleFactor and scale - how to handle in 3.1.3?
<p>I am tasked with making an app that works in iOS 4.0 work in 3.1.3 and 3.2 again. Mostly it is straightforward but the handling of the new API for scale and other situations where values must be passed/returned is hard.</p>

<p>respondsToSelector/performSelector takes care of nearly everything else.</p>

<p>Here's a simplified version of what is going on:</p>

<pre><code>-(float)getImageScaleFactor 
{
  if([[UIScreen mainScreen] scale == 2.0)
      return kScaleFactorForRetinaDisplay;
  else
      return kScaleFactorForOlderDisplay;
}
</code></pre>

<p>scale isn't in iOS prior to 4.0.</p>

<p>Can anyone show a code sample that will work in all versions of iOS? </p>
