I created a toolbar on a two-button collector and worked on ios7 when I ran an ios8 crash:
Completion of the second application to the excluded exception "UIViewControllerHierarchyInconsistency", reason: "child view" controller: must Have a parent view controller: but requested parent: '
This is a piece of code that worked quietly in ios7:
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;
You know that I realized that inputAccessoryView going to destroy the application, I also asked Apple engineers, and they told me that this is a beta test problem, but now with GM it continues to give the same problem.
What should I do?
ios inputaccessoryview uipickerview
Marco Giraudo Sep 10 '14 at 9:33 2014-09-10 09:33
source share