title: XCode 7 Date picker cause crash of application
body: <p>Hi I need to integrate date picker with inputView, I am on Xcode7. Using below code the application cause exception. The exception happening while I am touching UITextField element. </p>
  
  <p>Here is the relevant part of the code where the date picker used.</p>
  
  <pre><code>@property (weak, nonatomic) IBOutlet UIDatePicker *graphDate;
  @property (weak, nonatomic) IBOutlet UITextField *fromdate;
  @property (weak, nonatomic) IBOutlet UITextField *toDate;
  ............................................................
  ..............................................................
  
  [_graphDate setDatePickerMode:UIDatePickerModeDateAndTime];
  
  ............................................................
  ..............................................................
  
  [_graphDate setHidden:TRUE];
  [_graphDate setFrame:CGRectMake(600, 600, 400, 162)];
  _toDate.inputView = _graphDate;
  _fromdate.inputView = _graphDate;
  _graphDate.date = [NSDate date];
  </code></pre>
  
  <p>The exception message,</p>
  
  <pre><code> Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason:
   'child view controller:&lt;UICompatibilityInputViewController: 0x80286850&gt;
   should have parent view controller:&lt;VALiveViewController: 0x7cbeda00&gt;
   but requested parent is:&lt;UIInputWindowController: 0x7cc25a00&gt;'
  </code></pre>
  
  <p>I already refereed the answer here <a href="https://stackoverflow.com/questions/22744059/uiviewcontrollerhierarchyinconsistency-in-64-bit-ios-device">UIViewControllerHierarchyInconsistency in 64 bit iOS device</a> but no idea how to apply here, I am newbie in IOS. </p>
  
  <p>Any help will be appreciated.<br>
  Thanks,<br>
  Haris</p>