Advertisement
Guest User

Untitled

a guest
Apr 20th, 2014
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. //Tapping to change on row
  2. - (void)tableView:(UITableView *)tableView didDeselectRowAtIndexPath:(NSIndexPath *)indexPath
  3. {
  4. UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
  5. NSLog(@"%@", cell.textLabel.text);
  6. if([cell.textLabel.text isEqualToString:@"Helmet"])
  7. {
  8. [self performSegueWithIdentifier:@"toHelmetView" sender:indexPath];
  9. }
  10. }
  11.  
  12.  
  13. //Segue control, fetch helmet and send it
  14. - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
  15. {
  16. if ([segue.identifier isEqualToString:@"toHelmetView"])
  17. {
  18. // Fetch the selected object
  19. //EquipmentCategory *o = [_frc objectAtIndexPath:[self.tableView indexPathForSelectedRow]];
  20.  
  21. // Configure the next view + controller
  22. HelmetView *nextVC = (HelmetView *)segue.destinationViewController;
  23.  
  24. nextVC.title = @"Helmet";
  25. nextVC.model = self.model;
  26. nextVC.h = [self.model helmetForPlayer:self.p];
  27. }
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement