L
L
Los Angeles2018-07-23 18:22:04
iOS
Los Angeles, 2018-07-23 18:22:04

How to organize a multi-screen form?

Input data: There is a UITabBarController. Within each tabin there is a UINavigationController. We are working within one of the tabs.
Everything is MVVM to some extent. I don't use storyboards and .xib files.
Task: You need to make a form that will eventually send the data collected at each of its (form) stages to the server. During the filling process, various auxiliary requests will be sent to fill various controls with data.
Interested in:

  1. The design is such that each stage of the form can be made as a separate UIViewController that is pushed onto the stack, but I don’t know if this is necessary or not. I don't know if there are other convenient options. (further in the questions I will proceed from the case when each separate stage of the form is a separate UIViewController)
  2. At each stage (screen) of the form there is a title, and the title depends on the context common to the entire form and determined at the initial stage (screen) of the form
  3. It should also be possible to throw out or vice versa add one or more stages to a specific context
  4. Very interested in how I can access the collected data from various stages of the form

Answer the question

In order to leave comments, you need to log in

1 answer(s)
E
Egor Sh, 2018-07-25
. @EgorkZe

Do a general flow storage and inject into each of the screens, fill it with data, and when you get to the last step in the flow, you can take the data back from the flow storage and do whatever you want with it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question