Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (void)segmentedControl:(SVSegmentedControl*)segmentedControl didSelectIndex:(NSUInteger)index
- {
- if (index == 0)
- {
- MyTableViewController *myViewController = [[MyTableViewController alloc] initWithNibName:@"MyTableViewController" bundle:nil];
- myViewController.view.frame = CGRectMake(0.,40.,self.view.frame.size.width,self.view.frame.size.height-40.);
- self.theTableViewController = myViewController;
- [myViewController release];
- [self.view addSubview: self.theTableViewController.view];
- }
- - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
- {
- SpecificExerciseTableViewController *specificExerciseTableViewController = [[SpecificExerciseTableViewController alloc] initWithNibName:@"SpecificExerciseTableViewController" bundle:nil];
- specificExerciseTableViewController.exerciseArray = [[self.muscleArray objectAtIndex:indexPath.row]objectForKey:@"exercises"];
- specificExerciseTableViewController.muscleName = [[self.muscleArray objectAtIndex:indexPath.row]objectForKey:@"muscleName"];
- NSString *muscleURL = [[self.muscleArray objectAtIndex:indexPath.row]objectForKey:@"musclePicture"];
- specificExerciseTableViewController.muscleURL = muscleURL;
- [self.navigationController pushViewController:specificExerciseTableViewController animated:YES];
- [specificExerciseTableViewController release];
- }
Add Comment
Please, Sign In to add comment