public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { if (_controller.GetType() == typeof(SectionViewController)) { HymnPageViewController hymnview = _controller.Storyboard.InstantiateViewController("HymnPage") as HymnPageViewController; if (hymnview != null) { _controller.NavigationController.PushViewController(hymnview, true); tableView.DeselectRow(indexPath, true); } return; } SectionViewController sectionview = _controller.Storyboard.InstantiateViewController("SectionView") as SectionViewController; if (sectionview != null) { _controller.NavigationController.PushViewController(sectionview, true); } tableView.DeselectRow(indexPath, true); }
public override void RowSelected(UITableView tableView, NSIndexPath indexPath) { int itemId = objects[(int)indexPath.Item].Key; if (_controller.GetType() == typeof(SectionViewController)) { HymnsListViewController hymnview = _controller.Storyboard.InstantiateViewController("HymnsList") as HymnsListViewController; if (hymnview != null) { hymnview.id = itemId; _controller.NavigationController.PushViewController(hymnview, true); tableView.DeselectRow(indexPath, true); } return; } else if (_controller.GetType() == typeof(HymnsListViewController)) { HymnPageViewController hymnview = _controller.Storyboard.InstantiateViewController("HymnPage") as HymnPageViewController; if (hymnview != null) { hymnview.id = itemId; _controller.NavigationController.PushViewController(hymnview, true); tableView.DeselectRow(indexPath, true); } return; } SectionViewController sectionview = _controller.Storyboard.InstantiateViewController("SectionView") as SectionViewController; if (sectionview != null) { sectionview.id = itemId; _controller.NavigationController.PushViewController(sectionview, true); } tableView.DeselectRow(indexPath, true); }