Basically I am trying to create a resizing UITextView within a inputAccessoryView property.
I have a viewController with the method canBecomeFirstResponder returning tru
A fairly simple fix for this is to not make the actual inputAccessoryView resize at all - if you know the maximum height you'll need for it, you can create it at that maximum height, make it transparent, and add a subview that resizes however you like.
The detail you need to make it work is that that the inputAccessoryView needs to be a UIView subclass containing the following:
- (BOOL)pointInside:(CGPoint)point withEvent:(UIEvent *)event
{
point = [self.innerView convertPoint:point fromView:self];
return [self.innerView pointInside:point withEvent:event];
}
(where self.innerView is your dynamically resizing subview).
This makes it claim taps inside the subview, but pass on any that fall outside it.
The main drawback to be aware of is that keyboard notifications will give you frames containing the entire max-height inputAccessoryView. So if you're using them to (eg) adjust insets, you need to do some extra math there.