IOS8 - Appearance of keyboard accessories with dynamic height

We have a UITextView with an accessory for typing on the keyboard - an accessory is another UIView with several buttons and another UITextView that grows in height as necessary to display a message. (similar to what you see in iMessage)

Everything works fine using iOS7, and when updating the frame size, the input accessory grows up above the keyboard. But with iOS8, the look of the accessory grows downward, expanding above smart text and a keyboard.

Is there a new way to talk about the look of the iOS8 keyboard on relaying accessories? I tried calling ReloadInputViews () and it does not change anything.

Stuck on this - thanks for the help.

+6
source share
2 answers

I override the addConstraint method in my view, as apple sets a constant-height constraint for iOS8. This seems to solve the problem.

+1
source

I also encounter this problem. What I do is override the inputAccessoryView layoutSubviews method and make the height a fixed number. eg:

- (void)layoutSubviews { if (self.height > 38) { self.height = 38; } } 

PS: which is strange when your input window height exceeds 50, inputAccessoryView will not grow down.

0
source

Source: https://habr.com/ru/post/976015/


All Articles