1

I have a UIViewController which I show sometimes as a UIViewController and some others like UIPopoverController, but I want them to show a different message depending if is showed as one or another, is there a line of code which helps me to know this?

something like:

if(self.popover) NSLog(@"this is a popover");
else NSLog(@"this is a viewcontroller");

thanks in advance

Jesús Ayala
  • 2,743
  • 3
  • 32
  • 48
  • Check http://stackoverflow.com/questions/4191840/determine-if-a-view-is-inside-of-a-popover-view for discussion of several methods to do this. – Jake Spencer Jul 18 '13 at 19:30
  • I tried with a couple of them but none worked, I must say it is a popover inside of a navigation controller for displaying it's buttons as well – Jesús Ayala Aug 01 '13 at 17:23

0 Answers0