Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kevinmcmahon/713202 to your computer and use it in GitHub Desktop.
Save kevinmcmahon/713202 to your computer and use it in GitHub Desktop.
Totally hack fix to MultipleDetailViews
public override void RowSelected (UITableView tableView, NSIndexPath indexPath)
{
int row = indexPath.Row;
ISubstitutableDetailViewController dvc = null;
if(row == 0)
{
dvc = new FirstDetailView();
}
if(row == 1)
{
dvc = new SecondDetailView();
}
var oldVC = (ISubstitutableDetailViewController)_rootViewController.SplitViewController.ViewControllers[1];
dvc.RootPopoverButtonItem = oldVC.RootPopoverButtonItem;
dvc.PopOverController = oldVC.PopOverController;
var vcs = new UIViewController[] {_rootViewController.NavigationController,dvc as UIViewController};
_rootViewController.SplitViewController.ViewControllers = vcs;
dvc.ShowRootPopoverButtonItem( dvc.RootPopoverButtonItem);
dvc.PopOverController.Dismiss(true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment