iPhone X - UINavigationController keeping UIToolbar normal heights using explicit setting
| Originator: | felipekellermann | ||
| Number: | rdar://34861659 | Date Originated: | October 6 2017, 4:17 PM |
| Status: | Open | Resolved: | |
| Product: | iOS + SDK | Product Version: | iOS 11.1b1 (15B5066e) |
| Classification: | Suggestion | Reproducible: | Always |
The `UIToolbar` provided by `UINavigationController` is used by lots of apps and interfaces because it is available since the beginning of iOS and also it provides lots of useful behavior using flags as `hidesBarsWhenVerticallyCompact`, `hidesBarsOnTap` and others. Using a custom `UIToolbar` when using a container like `UINavigationController` is quite rare. While the UITabBar always needs to be offset because it defaults to centralized elements, it is quite common to have toolbars with a single (small) button to the left or right, or two buttons separated by flexible space. The new iPhone X home handle will not overlap the buttons but the toolbar height gets the new sizing. I could change to a custom UIToolbar but I will be loosing most of the benefits already provided by the UINavigationController. Thus I see two possibilities: 1) Provide an explicit flag (e.eg., `hidesBarsWhenVerticallyCompact`, `hidesBarsOnTap`) that I can safely enable to avoid the height change. I know that a single bar button to the left and/or right will not overlap with the home handle. OR: 2) Not so good: Automatically detect that the home handle will not overlap the bar buttons and avoid the height change. While UITabBar tabs will always overlap, the UIToolbar bar buttons have many common cases where single buttons will not overlap resulting in a huge bar with a single button.
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!