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

TabBar: present modal view from tabbar item #88

Open
Luur opened this issue Aug 2, 2022 · 2 comments
Open

TabBar: present modal view from tabbar item #88

Luur opened this issue Aug 2, 2022 · 2 comments

Comments

@Luur
Copy link

Luur commented Aug 2, 2022

Hi everyone,

First of all, thank you for the great framework.

I have a question. Is it possible to present the modal view from tabbar item? If yes, how can I do it?
In the app I'm working on, I need to force users to log in before they can reach a specific tabbar item.

@Luur Luur changed the title TabBar: present modal view for tabbar item TabBar: present modal view from tabbar item Aug 2, 2022
@LePips
Copy link
Collaborator

LePips commented Aug 3, 2022

I left a comment on this earlier and deleted it as I misunderstood the request.

Sort of, however is that what you should do? Somewhere in your code you store your session and authenticated state and the coordinator should not be concerned with that. Nonetheless, it is possible with the onTapped action in the @Route property wrapper.

Here is a minimal example of that: https://pastebin.com/xkpLbDpC

However, I don't think that's a proper implementation as the view should present the modal if unauthenticated.

Here is a minimal example of that: https://pastebin.com/we7p2Twy

However, there's a bug I experience some times when the router won't do anything so I should track that down as I experience it in my app but haven't bothered with it.

For reference, the Fidelity app has a similar flow.

@Luur
Copy link
Author

Luur commented Aug 3, 2022

Hey, thank you very much for your response.
I caught the idea.
However, I do like your ideas from deleted comment. I'm going to discuss it with the UX designer to find which approach will suit us better.

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