You don't do this in a custom keyboard - the inputAccessoryView
is something that the app itself (the one controlling the text field you're entering text into) adds above whatever keyboard is in use. If you need more height for your keyboard, you can use this code (copied from Apple's App Extension Programming Guide):
CGFloat _expandedHeight = 500; // this is the height you want your keyboard to be
NSLayoutConstraint *_heightConstraint =
[NSLayoutConstraint constraintWithItem: self.view
attribute: NSLayoutAttributeHeight
relatedBy: NSLayoutRelationEqual
toItem: nil
attribute: NSLayoutAttributeNotAnAttribute
multiplier: 0.0
constant: _expandedHeight];
[self.view addConstraint: _heightConstraint];