Supporting iOS versions prior to 4.0/3.2 and problems with NSClassFromString
<p>I'm currently developing iPhone applications that -- for the time being -- need to be supported on versions prior to 4.x.</p>

<p>When I want to use something 4.x or 3.2 specific, I would use the usual approach of checking if a given class exists, i.e.:</p>

<pre><code>if(NSClassFromString(@"SomeClass")) {
  // do stuff here
}
</code></pre>

<p>This mostly works, except when it doesn't.
Let me explain:</p>

<p>Classes like:</p>

<ul>
<li>UIMoviePlayerViewController (only available on 3.2+ according to the documentation)</li>
<li>UIGestureRecognizer subclasses (like UIPanGestureRecognizer; UITapGestureRecognizer, etc.)</li>
</ul>

<p>Actually resolve to valid classes, as if they were already available on private APIs on earlier versions.
Is this the case, or am I missing something?</p>

<p>This is really bad, since the <code>NSClassFromString()</code> approach is actually recommended by Apple.</p>

<p>To be on the safe side, I'm currently checking the OS version instead of doing runtime checking for the classes existence.</p>

<p>Anyone else having this problem?
Thanks.</p>
