R
R
redcircle2018-06-20 19:12:26
iOS
redcircle, 2018-06-20 19:12:26

Show modal login controller, or toggle root controller?

The iOS application consists of the main controller, and the login controller (where the login password and the Login button are entered).
The logic is such that the main controller can only be shown in the logged in state. That is, when the application starts, you need to show the login controller, and after a successful login, show the main controller. After logout, you need to show the login controller again.
In terms of Apple guidelines, what is the best way to do this? I see 2 options.
1) The main controller is root-controller, and the login controller is immediately shown as a modal controller. Remove it after login.
2) We switch root-contoller, depending on whether the user is logged in. Before login / after logout - set the root-contoller property to the login controller, after login - set the root-contoller property to the main controller.
Which option is more correct from Apple's point of view?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question