element-hq / element-hq/element-ios

View hierarchy: Do not embed UITabBarController inside UINavigationController

Open
#3,086 0 comments 0 reactions 0 assignees View on GitHub
A-Developer-Experience A-Navigation
Dominant language
Swift
Stars
1.8k
Forks
544
PR merge metrics
PR metrics pending

Description

Currently a the `UITabBarController` is embedded inside a `UINavigationController`. It is discourage by Apple and prevent us to customize navigation bar easily for each tab.

Extract from Apple [documentation](https://developer.apple.com/library/archive/documentation/WindowsViews/Conceptual/ViewControllerPGforiOSLegacy/TabBarControllers/TabBarControllers.html#//apple_ref/doc/uid/TP40011381-CH102-SW1):

> Note: Although a navigation controller can be embedded inside a tab, the reverse is not true. Presenting a tab bar interface from within a navigation interface is potentially confusing for users. A navigation interface uses one or more custom view controllers to present an interface focused on one goal, which is usually the management of a specific type of data. By contrast, the tabs of a tab bar interface can reflect completely different purposes in an application and need not be related in any way. In addition, pushing a tab bar controller on a navigation stack would cause the tabs to be displayed for that screen only and not for any others.

Below current view hierachy:

![image](https://user-images.githubusercontent.com/2205780/78896724-365a4480-7a71-11ea-85b2-e9086bcaa847.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.