If you still do not understand this, I will share my situation and find out if I have a modal controller.
I have a segue that represents a view controller modulo. This view controller is built into the navigationController, so I inherit all the good features of the UIBarButtonItem.
if ([self.parentViewController.presentingViewController.modalViewController isEqual:self.parentViewController]) { NSLog(@"I'm in a modal view controller!"); }
Hope this helps
Caborca87
source share