How do I create dynamically updating views in a tab bar view based on a selection of options?

Noob question ....

I created a Tab Bar app. It has four tabs and works great. Each view is created using XIB and is effectively static. Each view takes user input and responds on the screen.

What I need to do is change the input options the user has - actually remove some UITextFields depending on which option the user selects in the preferences.

I created root.plist and created settings with no problem. I also created additional XIBS for the modified UI, but what I don't know how to do is calling them in the on-demand tabbed view controller. An effective tab has 3 possible views, a tab two 3 possible views, etc. But I only need one that is suitable for displaying user settings?

Make sense?

For reference, if we call different views - UIInputViewA1, ... A2, .... A3 UIInputViewB1, .... B2 .... B3, etc.

Hope someone can help, trawling the net during the night trying to figure this out. The iPhone design Bible doesn't help either.

If you need more information please shout out.

Greetings

Paul.

0


a source to share


1 answer


Instead of completely replacing one xib for another, why not just add / remove controls programmatically based on settings? Just make sure you have all the controls in the xib linked to the outputs in the File Owner so that you can access them all from your code. For a starting point, just send a "hide" message to the controls you want to hide. You should later learn how to properly remove and deallocate these controls when you no longer need them.



0


a source







All Articles