Adds name to monster detail view.

Passes the selected monster from the search view to the monster detail view.
This commit is contained in:
2020-09-06 13:09:03 -07:00
parent 2f57c10a5a
commit 32025eb4e7
4 changed files with 32 additions and 17 deletions

View File

@@ -33,15 +33,18 @@
// Do any additional setup after loading the view.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
if ([@"ShowMonsterDetail" isEqualToString:segue.identifier]) {
NSIndexPath *indexPath = [self.searchResults indexPathForSelectedRow];
MonsterViewController *vc = (MonsterViewController*)segue.destinationViewController;
vc.monster = [_monsters objectAtIndex:indexPath.row];
}
}
*/
#pragma mark - UITableViewDataSource