public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender) { if (segue.Identifier == "NavigateToIntroDetailSegue") { IntroDetailViewController controller = segue.DestinationViewController as IntroDetailViewController; var indexPath = TableView.IndexPathForCell(sender as UITableViewCell); if (indexPath.Section == 0) { Utils.itemReadingSelected = DBMgr.Instance.FilteredIntros[indexPath.Row].Para; } if (indexPath.Section == 1) { Utils.itemReadingSelected = DBMgr.Instance.FilteredSummaries[indexPath.Row].Summary; } if (indexPath.Section == 2) { Utils.itemReadingSelected = DBMgr.Instance.FilteredChapters[indexPath.Row].Reading; } controller.nCurrentItemIndex = 0; controller.bSearch = true; controller.bIntroduction = false; TableView.DeselectRow(indexPath, true); } }
public override void PrepareForSegue(UIStoryboardSegue segue, NSObject sender) { if (segue.Identifier == "NavigateToIntroDetailSegue") { IntroDetailViewController controller = segue.DestinationViewController as IntroDetailViewController; var indexPath = TableView.IndexPathForCell(sender as UITableViewCell); controller.bSearch = false; controller.bIntroduction = false; controller.nCurrentItemIndex = indexPath.Row; Utils.itemReadingSelected = DBMgr.Instance.ChapterItems[indexPath.Row].Reading; TableView.DeselectRow(indexPath, true); } }