You must make sure that the view you assign to inputView or inputAccessoryView does not belong to any parent view.
This error is particularly annoying since any βinput viewβ created in the storyboard (and thus added to the VC view ) cannot be set as inputView or inputAccessoryView without causing this failure.
If the input view is not added to the VC view , the input view will not be available for visual editing in the interface builder layout. It is displayed only in the left panel of the storyboard.
How to connect the Xcode Storyboard "Simulated Metrics" toolbar to the actual IBUutlet UIToolbar?
I would rather make an IB connection to inputAccessoryView right in the storyboard. It causes this crash. The solution I found is to make a secondary IBOutlet connected to the view in the Storyboard, then in viewDidLoad remove it from the super view, and then immediately assign inputAccessoryView . Not sure if I will eventually use this.
- (void) viewDidLoad { // ... [self.keybordView removeFromSuperview]; self.inputAccessoryView = self.keybordView; }
pkamb May 28 '15 at 1:34 a.m. 2015-05-28 01:34
source share