How to check which UIViewController is active
<p>I need to check which UIViewController is active so I have implemented some cases depending upon the result.</p>

<pre><code>[self.navigationController.visibleViewController className]
</code></pre>

<p>This always returns null. </p>

<p>I am checking with this statement: </p>

<pre><code>if([iDetailController isKindOfClass:[IDetailController class]])
</code></pre>

<p>but it fails, kindly help me if I am doing something wrong here.</p>
