In my UIKit app, in my view controller, I have a toolbar at the bottom of the screen and a UITextView, and I need to get the size of the toolbar to calculate the correct keyboard intersection, and change my text view layout so that the text doesn't get obscured when the keyboard is shown on screen. It's been working fine till now, but with iOS26, I am running into an issue, because the toolbar size is completely different.
For this code:
NSInteger offset = (self.navigationController.isToolbarHidden == NO)? (self.navigationController.toolbar.frame.size.height): 0;
iOS18 returns '49' iOS26 returns ''812'.
This obviously throws off the calculations for keyboard avoidance.
Is there a way to overcome this, other than ignoring or hard-coding toolbar height?