How to hide inputAccessoryView without dismissing keyboard
For me Eric's solution never actually reset the frame or the touch areas. Presumably it's a bug with how Apple handles things. However, I found a workaround that solved the problem for me. When I set a new inputAccessoryView without a frame, reloadInputViews worked fine:
myTextView.inputAccessoryView = [[UIView alloc] initWithFrame: CGRectZero];
[myTextView reloadInputViews];
None of the answers above were working for me and reloadInputViews was causing weird issues. Eventually I got it to show and hide and have touches passthrough by doing:
Hide it:
[textview.inputAccessoryView setHidden:YES];
[textview.inputAccessoryView setUserInteractionEnabled:NO];
Show it:
[textview.inputAccessoryView setHidden:NO];
[textview.inputAccessoryView setUserInteractionEnabled:YES];
myTextView.inputAccessoryView = nil;
[myTextView reloadInputViews];
This removes the toolbar from the view and reloads the view. This way you don't need to call resignFirstResponder and becomeFirstResponder. Additionally, this will still keep your cursor placement and content.