I encountered this problem before.
- You have to ensure that the view you will assign to
inputAccessoryViewdoesn’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.
- Use the method
removeFromSuperviewon the view you will assign to