I am getting viewControllers on navigationController stack as follows. Now I need to check if controller on top is one of known vc. How to get vc class name in order to compare
if ([NSStringFromClass([[viewContrlls lastObject] class]) isEqualToString: @"Whatever"]){ }
You could also use -isKindOfClass if you prefer to compare directly an instance to a specific class.
-isKindOfClass