Swapna
Swapna

Reputation: 2235

How to find the current uiviewcontroller?

My Application has around 4 UIViewControllers. Is it possible to find the current UIViewController?

Upvotes: 2

Views: 1636

Answers (1)

Swastik
Swastik

Reputation: 2425

NSArray *viewContrlls=[[self navigationController] viewControllers];
[viewContrlls lastObject];

Upvotes: 7

Related Questions