title: Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency',
body: <p>I created a toolbar above the picker with two buttons and worked on ios7, when i run in ios8 crash:</p>
  
  <blockquote>
    <p>Terminating app two to uncaught exception
    'UIViewControllerHierarchyInconsistency', reason: 'child view
    controller:  Should
    Have parent view controller:  but requested parent is: '</p>
  </blockquote>
  
  <p>This is the piece of code that worked quietly in ios7:</p>
  
  <pre><code> expiredPromoTextField.inputView = DatePicker;
   expiredPromoTextField.delegate = self;
   quantityPromoTextField.inputView = quantityPicker;
   quantityPromoTextField.delegate = self;
  
  
   // Create button to close the UIPickerView
   UIToolbar * mypickerToolbar = [[UIToolbar alloc] initWithFrame: CGRectMake (0, 0, 320, 56)];
   mypickerToolbar.barStyle = UIBarStyleBlackTranslucent;
   [mypickerToolbar sizeToFit];
   NSMutableArray * barItems = [[NSMutableArray alloc] init];
   UIBarButtonItem * CancelBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemCancel target: self action:selector (cancelDoneClicked)];
   [barItems addObject: CancelBtn];
   UIBarButtonItem * FLEXspace = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemFlexibleSpace target: self action: nil];
   [barItems addObject: FLEXspace];
   UIBarButtonItem * doneBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemDone target: self action:selector (pickerDoneClicked :)];
   [barItems addObject: doneBtn];
   [mypickerToolbar setItems: barItems animated: YES];
   [quantityPicker setShowsSelectionIndicator: YES];
  
   expiredPromoTextField.inputAccessoryView = mypickerToolbar;
   quantityPromoTextField.inputAccessoryView = mypickerToolbar;
  </code></pre>
  
  <p>You know what I realized is that <code>inputAccessoryView</code> is going to crash the app, I also asked engineers of Apple and they told me that it was a problem with the beta, but now with the GM continues to give the same problem.</p>
  
  <p>What do I do?</p>