title: How to present a view controller from another view controller
body: <p>I am trying to open a ViewController from within another ViewController if certain conditions are met. The code seems to run without error but the view is never shown.  I am new to xcode 4 /ios 5 so I must be missing something.</p>
  
  <p>Here is the code responsible for opening the second viewcontroller:</p>
  
  <pre><code>CreateUserViewController *createUserController = [[CreateUserViewController alloc] initWithNibName:@"CreateUserView" bundle:[NSBundle mainBundle] keyWrapper:keyChainWrapper];
  
      [self presentViewController:createUserController animated:YES completion:nil];
  </code></pre>
  
  <p>In my project I have a xib called, "CreateUserView". I have added a view controller to this xib and assigned it to, "CreateUserViewController". </p>
  
  <p>Also I noticed in the apple documentation that is shows setting the delegate of the viewcontroller to be presented. But it seems that no property called, "delegate" is on the viewcontroller object. Is this documentation old? This is the document I am trying to use (section 9-1):</p>
  
  <p><a href="https://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html#//apple_ref/doc/uid/TP40007457-CH111-SW1" rel="nofollow">View Controller Programming</a></p>
  
  <p>Can someone give me a hint? Thanks..</p>
  
  <p><strong>edit</strong> Adding Custom Constructor</p>
  
  <pre><code>    -(id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil keyWrapper:(KeychainItemWrapper *)keyWrapper
  {
      self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
      if(self){
          [self setKeyChainWrapper:keyWrapper];
      } 
               return self;
  }
  </code></pre>