title: Storyboard and custom init
body: <p>I recently tried working with the MainStoryboard.storyboard within Xcode and so far It's going pretty good and I'm wondering why I've never used it before. While playing with some code I bumped into an obstacle and I don't know how to resolve this.</p>
  
  <p>When I alloc and init a new ViewController (with a custom init I declared in the ViewControllers class) I would do something like this:</p>
  
  <pre><code>ViewController *myViewController = [[ViewController alloc] initWithMyCustomData:myCustomData];
  </code></pre>
  
  <p>Then after that I could do something like:</p>
  
  <pre><code>[self presentViewController:myViewController animated:YES completion:nil];
  </code></pre>
  
  <p>When I'm working with a storyboard I'm learnt that switching to a standalone ViewController requires an Identifier.</p>
  
  <pre><code>UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
  ViewController *myViewController = [storyboard instantiateViewControllerWithIdentifier:@"MyViewControllerIdentifier"];
  [self presentViewController:myViewController animated:YES completion:nil];
  </code></pre>
  
  <p>How can I still use my custom initialization for myViewController while making use of a storyboard?</p>
  
  <p>Is it ok to just do something like this:</p>
  
  <pre><code>UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
  ViewController *myViewController = [storyboard instantiateViewControllerWithIdentifier:@"MyViewControllerIdentifier"];
  myViewController.customData = myCustomData;
  [self presentViewController:myViewController animated:YES completion:nil];
  
  
  
  
  //MyViewController.m
  - (id) initWithMyCustomData:(NSString *) data {
  if (self = [super init]) {
      iVarData = data;
  }
  return self;
  }
  </code></pre>