If you want to use inputAccessoryViewController, you need to subclass all UITextView or UITextField elements and override the readArrorAccessoryViewController property.
@interface MyTextView: UITextView @property (nonatomic, retain) UIInputViewController *inputAccessoryViewController; @end
Note that the view manager you provided must be a UIInputViewController (which will give you access to the input of the delegate and text document) and will create an “inputView” (as self.view) if you call [super loadView], which you can add your subroutines . This UIInputView will be appropriately styled for the keyboard. I have not experimented with trying to download from .xib in this case.
I also found the correct size of the inputView (and avoiding a bunch of error constraints), I added the following code
- (void)updateViewConstraints { self.view.frame = CGRectMake(0, 0, CGRectGetWidth(self.view.superview.frame), myAccessoryHeight); [super updateViewConstraints]; }
source share