Guest User

Untitled

a guest
Jul 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. - (void)segmentedControl:(SVSegmentedControl*)segmentedControl didSelectIndex:(NSUInteger)index
  2. {
  3. if (index == 0)
  4. {
  5. MyTableViewController *myViewController = [[MyTableViewController alloc] initWithNibName:@"MyTableViewController" bundle:nil];
  6. myViewController.view.frame = CGRectMake(0.,40.,self.view.frame.size.width,self.view.frame.size.height-40.);
  7. self.theTableViewController = myViewController;
  8. [myViewController release];
  9. [self.view addSubview: self.theTableViewController.view];
  10. }
  11.  
  12. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  13. {
  14. SpecificExerciseTableViewController *specificExerciseTableViewController = [[SpecificExerciseTableViewController alloc] initWithNibName:@"SpecificExerciseTableViewController" bundle:nil];
  15. specificExerciseTableViewController.exerciseArray = [[self.muscleArray objectAtIndex:indexPath.row]objectForKey:@"exercises"];
  16. specificExerciseTableViewController.muscleName = [[self.muscleArray objectAtIndex:indexPath.row]objectForKey:@"muscleName"];
  17.  
  18. NSString *muscleURL = [[self.muscleArray objectAtIndex:indexPath.row]objectForKey:@"musclePicture"];
  19. specificExerciseTableViewController.muscleURL = muscleURL;
  20. [self.navigationController pushViewController:specificExerciseTableViewController animated:YES];
  21. [specificExerciseTableViewController release];
  22. }
Add Comment
Please, Sign In to add comment