title: Crash when using UIPickerview as inputview for UITextfield in iOS 8
body: <p>I've been working with UIPickerview as input for UITextfield and it was perfectly with iOS 7 but once I run it on iOS 8, it just crash the app whenever I choose a textfield to input data; I don't know why.</p>
  
  <p>This is the code.           </p>
  
  <p>This is in my header file</p>
  
  <pre><code> @interface myViewController:UIViewController
   &lt;UITextFieldDelegate,UIPickerViewDelegate,UIPickerViewDataSource&gt;
  
   @property (weak, nonatomic) IBOutlet UIPickerView *pickerView;
   @property (weak, nonatomic) IBOutlet UITextField *myTxtfield;
  
   @end
  </code></pre>
  
  <p>And here is in my .m file</p>
  
  <pre><code> @implementation myViewController
  
   - (void)viewDidLoad
   {
       [super viewDidLoad];
  
       NSString *filePath = [[NSBundle mainBundle]
       pathForResource:@"myData" ofType:@"plist"];
  
       data = [[NSMutableArray alloc] initWithContentsOfFile:filePath];
       self.pickerView.showsSelectionIndicator = YES;
   }
  
   -(NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
        return 1;
   }
  
   -(NSInteger)pickerView:(UIPickerView *)pickerView
   numberOfRowsInComponent:(NSInteger)component{
       return [data count];
   }
  
   -(NSString *)pickerView:(UIPickerView *)pickerView
    titleForRow:(NSInteger)row forComponent:(NSInteger)component{
        return [data objectAtIndex:row];
   }
  
   - (void)pickerView:(UIPickerView *)pickerView
   didSelectRow:(NSInteger)row inComponent:(NSInteger)component
   {
       currentTextField.text = [data objectAtIndex:row];
   }
  
  
   -(BOOL) textFieldShouldReturn:(UITextField *)textField{
  
  
       [_myTxtfield resignFirstResponder];
  
       return YES;
   }
  
   -(void)textFieldDidBeginEditing:(UITextField *)textField {
  
       if (_myTxtfield.isEditing==YES)
       {
           textField.inputView = _pickerView;
           currentTextField = textField;
        }
  
      [[textField valueForKey:@"textInputTraits"]
      setValue:[UIColor lightGrayColor] forKey:@"insertionPointColor"];
   }
  
   -(void)textFieldDidEndEditing:(UITextField *)textField {
               [_pickerView selectRow:0 inComponent:0 animated:NO];
   }
  
   @end
  </code></pre>
  
  <p>And this is the crash message</p>
  
  <pre><code> *** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'child view controller:&lt;UICompatibilityInputViewController: 0x7fa7fd412c40&gt; should have parent view controller:&lt;myViewController: 0x7fa7fb8b7600&gt; but requested parent is:&lt;UIInputWindowController: 0x7fa7fd87d600&gt;'
   *** First throw call stack:
   (
       0   CoreFoundation                      0x0000000105521f35 __exceptionPreprocess + 165
       1   libobjc.A.dylib                     0x00000001051babb7 objc_exception_throw + 45
      2   CoreFoundation                      0x0000000105521e6d +[NSException raise:format:] + 205
      3   UIKit                               0x000000010394889f -[UIViewController _addChildViewController:performHierarchyCheck:notifyWillMove:] + 184
      4   UIKit                               0x0000000103ef5308 -[UIInputWindowController changeToInputViewSet:] + 491
      5   UIKit                               0x0000000103ef5ebd __43-[UIInputWindowController setInputViewSet:]_block_invoke + 85
       6   UIKit                               0x00000001038915ce +[UIView(Animation) performWithoutAnimation:] + 65
       7   UIKit                               0x0000000103ef5c8e -[UIInputWindowController setInputViewSet:] + 291
       8   UIKit                               0x0000000103ef1a7a -[UIInputWindowController performOperations:withAnimationStyle:] + 50
       9   UIKit                               0x0000000103ce1bce -[UIPeripheralHost(UIKitInternal) setInputViews:animationStyle:] + 1054
       10  UIKit                               0x000000010399731d -[UIResponder becomeFirstResponder] + 468
       11  UIKit                               0x000000010388ce03 -[UIView(Hierarchy) becomeFirstResponder] + 99
       12  UIKit                               0x0000000103f53ad7 -[UITextField becomeFirstResponder] + 51
       13  UIKit                               0x0000000103bdb9c1 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) setFirstResponderIfNecessary] + 177
       14  UIKit                               0x0000000103bdda30 -[UITextInteractionAssistant(UITextInteractionAssistant_Internal) oneFingerTap:] + 2263
       15  UIKit                               0x0000000103bd32e6 _UIGestureRecognizerSendActions + 262
       16  UIKit                               0x0000000103bd1f89 -[UIGestureRecognizer _updateGestureWithEvent:buttonEvent:] + 532
       17  UIKit                               0x0000000103bd6ba6 ___UIGestureRecognizerUpdate_block_invoke662 + 51
       18  UIKit                               0x0000000103bd6aa2 _UIGestureRecognizerRemoveObjectsFromArrayAndApplyBlocks + 254
       19  UIKit                               0x0000000103bccb1d _UIGestureRecognizerUpdate + 2796
       20  UIKit                               0x0000000103866ff6 -[UIWindow _sendGesturesForEvent:] + 1041
       21  UIKit                               0x0000000103867c23 -[UIWindow sendEvent:] + 667
       22  UIKit                               0x00000001038349b1 -[UIApplication sendEvent:] + 246
       23  UIKit                               0x0000000103841a7d _UIApplicationHandleEventFromQueueEvent + 17370
      24  UIKit                               0x000000010381d103 _UIApplicationHandleEventQueue + 1961
       25  CoreFoundation                      0x0000000105457551 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
       26  CoreFoundation                      0x000000010544d41d __CFRunLoopDoSources0 + 269
       27  CoreFoundation                      0x000000010544ca54 __CFRunLoopRun + 868
      28  CoreFoundation                      0x000000010544c486 CFRunLoopRunSpecific + 470
      29  GraphicsServices                    0x00000001082cc9f0 GSEventRunModal + 161
      30  UIKit                               0x0000000103820420 UIApplicationMain + 1282
      31  ÿßŸîÿ≠ÿ≥ÿ® ŸÜÿ≥ÿ®ÿ™ŸÉ               0x0000000102a7afbd ÿßŸîÿ≠ÿ≥ÿ® ŸÜÿ≥ÿ®ÿ™ŸÉ + 8125
      32  libdyld.dylib                       0x0000000105f11145 start + 1
   )  
  
   libc++abi.dylib: terminating with uncaught exception of type NSException
  </code></pre>