title: UIDatePicker issue
body: <p>I am writing an iPhone <strong>iOS 6.0</strong> application in <strong>XCode 4.5.2.</strong>
  My view has 3 UITextFields on it, a UIImageView to display a thumbnail image, and a UIDatePicker which is hidden by default, set in Interface Builder.</p>
  
  <p>My view is created using storyboards.</p>
  
  <p>One of the text fields is for the date picker, so when tapped the date picker is displayed at the bottom of the screen by setting the hidden field to NO. When you tap in any of the other text fields, the date picker disappears and the keyboard is shown.</p>
  
  <p>When you tap on the image view it uses a UIActionSheet to allow the user to select either a photo from your library or take a photo.</p>
  
  <p>The issue is when you tap in the text field for the date picker and then tap the image view to select the image to display once the delegate method </p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
  </code></pre>
  
  <p>ends the program crashes with the following error message</p>
  
  <blockquote>
    <p><em>*</em> Terminating app due to uncaught exception 'NSGenericException', reason: 'Unable to install constraint on view.  Does the constraint reference something from outside the subtree of the view?  That's illegal. constraint: view:; layer = ; contentOffset: {0, 0}>'</p>
  </blockquote>
  
  <p>It works fine if you go from one of the other text fields to the image view so I know the problem lies with the date picker somehow.</p>
  
  <p>At first I thought it was due to date picker still been shown, so on tap of the image view before the action sheet is shown I hide the date picker</p>
  
  <pre><code>dobDatePicker.hidden = NO;
  </code></pre>
  
  <p>I also set editing off on the view to take the focus off the text field</p>
  
  <pre><code>[self.view endEditing:YES];
  </code></pre>
  
  <p>It crashes both in the Simulator for iOS 6 using the iPhone 5 length screen and on my iPhone 5 as well.</p>
  
  <p>Can anyone shed some light on this?</p>
  
  <p>Thanks in advance</p>
  
  <p>EDIT:</p>
  
  <p>In the ViewDidLoad method in the view I had this code</p>
  
  <pre><code>self.dob.inputView = self.dobDatePicker
  </code></pre>
  
  <p>Seems commenting that out has stopped the crash but now it shows both the keyboard and date picker at the same time... guess one step closer though</p>