Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iPad can navigation controller be put inside popover?

I have made popover displaying UITableViewController, that is used for navigation. What I am interested in to know is - can you use navigational controller inside popover. Lets say you have table where each row transitions to new view. Can this be used in conjuction with popover view, and if so, can you provide some working examples?

like image 243
MegaManX Avatar asked Feb 06 '12 16:02

MegaManX


1 Answers

Yes, it's very much possible. Firstly create the object of your table class.

  TableClass *tblClassObj = [[TableClass alloc] init];

Then create the navigation controller object.

  UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:tblClassObj];

Then use this navigatin controller for your pop over controller.

  UIPopoverController *samplePopOver = [[UIPopoverController alloc] initWithContentViewController:navigationController];
  ...

Don't forget to release the objects.

like image 50
cocoakomali Avatar answered Jan 04 '23 11:01

cocoakomali