private void DrillDown(RewardItemModel reward) { if (reward != null) { if (reward.Type == "REWARD") { UIStoryboard board = UIStoryboard.FromName("Rewards", null); RewardDetailViewController ctrl = (RewardDetailViewController)board.InstantiateViewController("RewardDetailViewController") as RewardDetailViewController; ctrl.Reward = reward; ctrl.Subtitle = string.Format("{0} | {1}", RewardsViewController.RewardsCategoryName, RewardsViewController.RewardsSubcategoryName); RewardsViewController.NavigationController.PushViewController(ctrl, true); } else if (reward.Type == "CATEGORY") { UIStoryboard board = UIStoryboard.FromName("Rewards", null); RewardsViewController ctrl = (RewardsViewController)board.InstantiateViewController("RewardsViewController") as RewardsViewController; ctrl.RewardsCategoryName = RewardsViewController.RewardsCategoryName; ctrl.RewardsSubcategoryName = reward.Name; if (reward.ChildList != null) { ctrl.RewardList = reward.ChildList; } else { ctrl.CategoryID = reward.ID; SL.RewardList = null; } RewardsViewController.NavigationController.PushViewController(ctrl, true); } } }
void DrillDown(RewardItemModel reward) { if (reward != null) { if (reward.Type == "REWARD") { UIStoryboard board = UIStoryboard.FromName("Rewards", null); RewardDetailViewController ctrl = (RewardDetailViewController)board.InstantiateViewController("RewardDetailViewController") as RewardDetailViewController; ctrl.Reward = reward; RewardsViewController.NavigationController.PushViewController(ctrl, true); } else if (reward.Type == "CATEGORY") { UIStoryboard board = UIStoryboard.FromName("Rewards", null); RewardsViewController ctrl = (RewardsViewController)board.InstantiateViewController("RewardsViewController") as RewardsViewController; if (reward.ChildList != null) { ctrl.RewardList = reward.ChildList; } else { ctrl.CategoryID = reward.ID; } RewardsViewController.NavigationController.PushViewController(ctrl, true); } } }
public RewardsTableSource(RewardsViewController rewardsViewController) { RewardsViewController = rewardsViewController; }