Next-previous with a lot of views

I am trying to manage 18 different views. How can I efficiently handle the previous functionality for each view with this set of views?

+1


a source to share


2 answers


Do you see any problems handling these views in a standard way?

I am assuming you are creating each view either from nib or pragmatically. You are using UINavigatorController and / or UITabBarController and you add views, for the tab bar controller as an array for the navigator controller you open the first view and set up the callback methods.



Other views are popped / unloaded when the user views the user interface. I believe the UINavigationController will unload the views if memory is low and load them when needed.

If you put all the hard work aside until the data is needed, you should be fine - unless you hit some constraints, but I can't tell because there is a lack of detail on what is in these views - complex data, images ...

0


a source


The easiest way to deal with this is to create a class that derives from UIViewController and implement it using the delegate method show

and hide

. Then all of your view controllers are derived from this class and overridden for any type of custom behavior.

Thus, each screen has a sequential way to go to the next view and a sequential way to return the results back to the caller.



How you navigate between views is based on what you are doing. The NavController is a good way to walk through the hierarchy or take the user through a step-by-step procedure. The modal dialog works when you need the user to enter something before continuing.

But with the standard show / hide interface, it should make it easier to control the flow between screens.

0


a source







All Articles