title: Trouble with Segue between ViewController
body: <p>I am still a little fuzzy on segueing between view controllers. I'm making an app that lets you answer questions to determine your personality type. I'm trying to go from my main menu to another view controller with a table to hold all the questions. My app crashes though when I click my desired button "Take The Test" instead of going to the desired view controller. I don't really want to pass any info to the table view, just segue to the TestViewController.</p>
  
  <p>I set the segue as push when the "Take The Test" is clicked. And it's identifier is "showTestDetail"</p>
  
  <p>MenuViewController.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface MenuViewController : UIViewController
  
  // Declaring Menu variables
  @property (weak, nonatomic) IBOutlet UIImageView *titlePhoto;
  @property (weak, nonatomic) IBOutlet UIButton *takeTest;
  @property (weak, nonatomic) IBOutlet UIButton *personailtyTypes;
  @property (weak, nonatomic) IBOutlet UIButton *readTheory;
  
  @end
  </code></pre>
  
  <p>MenuViewController.m</p>
  
  <pre><code>import "MenuViewController.h"
  #import "TestViewController.h"
  
  @interface MenuViewController ()
  
  @end
  
  @implementation MenuViewController
  
  @synthesize titlePhoto;
  @synthesize takeTest;
  @synthesize personailtyTypes;
  @synthesize readTheory;
  
  - (void)viewDidLoad {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
  
      // Initialize menu title image
      self.titlePhoto.image = [UIImage imageNamed:@"mainTitle_16pt.png"];
  }
  
  - (void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  
      if ([segue.identifier isEqualToString:@"showTestDetail"]) {
          TestViewController *testDetailController = (TestViewController *)segue.destinationViewController;
      }
  }
  @end
  </code></pre>
  
  <p>TestViewController.h</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  #import "Questions.h"
  
  @interface TestViewController : UIViewController &lt;UITableViewDataSource, UITableViewDelegate&gt;
  
  @property (strong, nonatomic) IBOutlet UITableView *tableView;
  @property (strong, nonatomic) IBOutlet UITextView *instructions;
  @property (weak, nonatomic) IBOutlet UIButton *results;
  @property (nonatomic, strong) Questions *survey;
  
  @end
  </code></pre>
  
  <p>TestViewController.m</p>
  
  <pre><code>#import "TestViewController.h"
  
  @interface TestViewController ()
  
  @end
  
  @implementation TestViewController {
      NSDictionary *allQuestions;
  }
  
  @synthesize survey;
  @synthesize results;
  @synthesize instructions;
  
  - (void)viewDidLoad {
      [super viewDidLoad];
  
      // set up question array
      survey.questions = @[@"1. You find it difficult to introduce yourself to other people",
                          @"2. You often get so lost in thoughts that you ignore or forget your surroundings",
                          @"3. You try to respond to your e-mails as soon as possible and cannot stand a messy inbox",
                          @"4. You find it easy to stay relaxed and focused even when there is some pressure",
                          @"5. You don’t usually initiate conversations",
                          @"6. You rarely do something just out of sheer curiosity",
                          @"7. You feel superior to other people",
                          @"8. Being organized is more important to you than being adaptable",
                          @"9. You are usually highly motivated and energetic",
                          @"10. Winning a debate matters less to you than making sure no one gets upset",
                          @"11. You often feel as if you have to justify yourself to other people",
                          @"12. Your home and work environments are quite tidy",
                          @"13. You do not mind being at the center of attention",
                          @"14. You consider yourself more practical than creative",
                          @"15. People can rarely upset you",
                          @"16. Your travel plans are usually well thought out",
                          @"17. It is often difficult for you to relate to other people’s feelings",
                          @"18. Your mood can change very quickly",
                          @"19. In a discussion, truth should be more important than people’s sensitivities",
                          @"20. You rarely worry about how your actions affect other people",
                          @"21. Your work style is closer to random energy spikes than to a methodical and organized approach",
                          @"22. You are often envious of others",
                          @"23. An interesting book or a video game is often better than a social event",
                          @"24. Being able to develop a plan and stick to it is the most important part of every project",
                          @"25. You rarely get carried away by fantasies and ideas",
                          @"26. You often find yourself lost in thought when you are walking in nature",
                          @"27. If someone does not respond to your e-mail quickly, you start worrying if you said something wrong",
                          @"28. As a parent, you would rather see your child grow up kind than smart",
                          @"29. You do not let other people influence your actions",
                          @"30. Your dreams tend to focus on the real world and its events",
                          @"31. It does not take you much time to start getting involved in social activities at your new workplace",
                          @"32. You are more of a natural improviser than a careful planner",
                          @"33. Your emotions control you more than you control them",
                          @"34. You enjoy going to social events that involve dress-up or role-play activities",
                          @"35. You often spend time exploring unrealistic and impractical yet intriguing ideas",
                          @"36. You would rather improvise than spend time coming up with a detailed plan",
                          @"37. You are a relatively reserved and quiet person",
                          @"38. If you had a business, you would find it very difficult to fire loyal but underperforming employees",
                          @"39. You often contemplate the reasons for human existence",
                          @"40. Logic is usually more important than heart when it comes to making important decisions",
                          @"41. Keeping your options open is more important than having a to-do list",
                          @"42. If your friend is sad about something, you are more likely to offer emotional support than suggest ways to deal with the problem",
                          @"43. You rarely feel insecure",
                          @"44. You have no difficulties coming up with a personal timetable and sticking to it",
                          @"45. Being right is more important than being cooperative when it comes to teamwork",
                          @"46. You think that everyone’s views should be respected regardless of whether they are supported by facts or not",
                          @"47. You feel more energetic after spending time with a group of people",
                          @"48. You frequently misplace your things",
                          @"49. You see yourself as very emotionally stable",
                          @"50. Your mind is always buzzing with unexplored ideas and plans",
                          @"51. You would not call yourself a dreamer.",
                          @"52. You usually find it difficult to relax when talking in front of many people",
                          @"53. Generally speaking, you rely more on your experience than your imagination",
                          @"54. You worry too much about what other people think",
                          @"55. If the room is full, you stay closer to the walls, avoiding the center",
                          @"56. You have a tendency to procrastinate until there is not enough time to do everything",
                          @"57. You feel very anxious in stressful situations",
                          @"58. You believe that it is more rewarding to be liked by others than to be powerful",
                          @"59. You have always been interested in unconventional and ambiguous things, e.g. in books, art, or movies",
                          @"60. You often take initiative in social situations"];
  
      // set up answers array
      survey.answers = @[[NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1],
                         [NSNumber numberWithInt:-1]];
      // set up dictionary of question/answer relationship
      allQuestions = [NSDictionary dictionaryWithObjects:survey.questions forKeys:survey.answers];
  
      // set up types array
      survey.types = @[@"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral",
                       @"neutral"];
  
      NSString *instr = @"Things to know:\n 1. Takes less than 12 minutes.\n 2. Answer honestly, even if you don't like the answer. \n 3. Try not to leave any 'neutral' answers ";
      UIFont *instrFont = [UIFont fontWithName:@"HelveticaNeue" size:12];
      CGSize textviewSize = [instr sizeWithFont:instrFont constrainedToSize:CGSizeMake(300, CGFLOAT_MAX) lineBreakMode:NSLineBreakByWordWrapping];
      instructions = [[UITextView alloc] initWithFrame:CGRectMake(10, 10, textviewSize.width, textviewSize.height)];
      instructions.text = instr;
      [self.view addSubview:instructions];
  
  
  }
  
  - (void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning];
  }
  
  - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
      return [survey.questions count];
  }
  
  - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
  
      static NSString *simpleTableIdentifier = @"QuestionCell";
  
      UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:simpleTableIdentifier];
  
      if (cell == nil) {
          cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:simpleTableIdentifier];
      }
  
      NSString *que = (NSString *)[survey.questions objectAtIndex:indexPath.row];
      cell.textLabel.text = que;
  
      return cell;
  }
  
  @end
  </code></pre>