I encountered this problem before.
Problem:
- You have to ensure that the view you will assign to
inputView
orinputAccessoryView
doesn’t belong to any parent view. When you create these views from a xib inside a ViewController, by default they are set as subviews of a superview.
Solution Tips:
- Use the method
removeFromSuperview
on the view you will assign toinputView
orinputAccessoryView