Q:

how to find out current uiviewcontroller

In my application, I am having following UIViewControllers;
HomeViewController
FirstViewController
SecondViewController, and etc...
My question is;
How can I find out whether SecondViewController is a current UIViewController or not ?

A:

I have find out the solution. Here is the code;

if([[self.navigationController visibleViewController] isKindOfClass:[SecondViewController class]])
{
}
else{
}

