Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multiple sub flow controllers? #10

Open
markkrenek opened this issue May 28, 2018 · 1 comment
Open

Add multiple sub flow controllers? #10

markkrenek opened this issue May 28, 2018 · 1 comment

Comments

@markkrenek
Copy link

Do you support multiple sub flow controllers, for example, maybe useful in the case of a tab bar.

add(subFlowController: FlowController) can be called multiple times, but it releases the previous controller. Therefore, there can only be one sub.

@fredpi
Copy link
Contributor

fredpi commented May 31, 2018

As I see it, the core question about such a feature is how one interprets the add(subFlowController: FlowController) method:

  1. Either without any semantics, just as a needed burden to keep flow controllers referenced and to thereby avoid releasing.
  2. Or, considering that Imperio can be seen as a shift from the UIView& UIViewController pattern to a UIViewController & FlowController pattern, with the semantics of a flow controller acting like a node, just as a TabBarController acts as a UIViewController node.

Semantically (according to the second interpretation) it would definitely make sense to have such a feature. If you only see the method as a way to stop ARC from releasing (in-line with the first interpretation), one could argue that a "tab flow controller" is a special case and should be handled by custom release management (storing as properties).

Considering the analogy between the roles of a FlowController and UIViewController in their respective architecture, I tend to interpret the method more semantically, so I'd be in favour of such a feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants