I have a UISplitViewController, with a master viewcontroller which is a table and a detail view controller.
I have implemented it as so:-
MainViewController.cs
public override void ViewDidLoad()
{
UpdateView(masterVC,detailVC);
}
public void UpdateView(UIViewController master, UIViewController detail)
{
this.ViewControllers = new ViewControllers[]{master, detail};
}
This works fine. Now I want to change the detail view controller to another one when the user clicks an row in the master viewcontroller.
What I do is:-
public override void RowSelected(UITableView tableView, NSIndexPath indexPath)
{
var mainVC = StoryBoard.InstantiateViewController("Main_VC") as MainViewController;
mainVC.UpdateView(mainVC.ViewControllers[0], newDetailVc);
}
This does not do anything and does not change the detail view to the new one. How can I implement this?