- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath{}
- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {}
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath
{
[self performSegueWithIdentifier:@"details" sender:indexPath];
}
- (void) prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([segue.identifier isEqualToString:@"workout"]) {
UITableViewCell *cell = (UITableViewCell*)sender;
NSIndexPath *indexPath = [self.tableView indexPathForCell:cell];
WorkoutTVC *wvc = (WorkoutTVC *) segue.destinationViewController;
wvc.workoutName = [self.listOfWorkoutNames objectAtIndex:indexPath.row];
}
else if ([segue.identifier isEqualToString:@"details"]) {
NSIndexPath *indexPath = [sender isKindOfClass:[NSIndexPath class]] ? (NSIndexPath*)sender : [self.tableView indexPathForSelectedRow];
WorkoutDetailsVC *wdvc = (WorkoutDetailsVC *) segue.destinationViewController;
wdvc.workoutName = [self.listOfWorkoutNames objectAtIndex:indexPath.row];
}
}
- (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath{}
[self performSegueWithIdentifier:@"SEGUE_ID" sender:self]; //*