I have just started programming on iOS a couple of weeks ago, so sorry if these questions are really basic.
Short story: I am designing a CRM app that needs capturing a lot of customer data. I am trying to emulate a desktop app that uses tabbed forms. What would be the best way (technically and visually) to implement this on an iPad?
I need the following:
- each tab (5-6 of them) to contain a number of fields (with labels) of various types, for which I would love to use specialized controls (eg uidatepicker, uipickerview/uisegmentedcontrol, textarea+stepper, switch etc.), not just raw text fields
- ideally (actually this is a pretty key requirement) the UI would have to be generated programatically, so that a change of model wouldn't require manually adjusting the forms in IB
- be able to switch between tabs without losing the data already entered in the current tab.
My progress so far, re. overall switching mechanism:
I initially thought to have the tabs switcher implemented as a segmented control, switching between different views as described in Matthias' comment here. Instantiating VCs on demand however means losing the data already entered (unless I'd implement some sort of caching, but I'm hoping for something simpler).
I'm now considering the much easier approach of switching views by showing/hiding them programatically, but I'm afraid this might use too much memory (I'm looking at possibly over 100 fields in total).
As for representing the form fields within each tab:
- I could lay them out manually in IB (or as static cells in a tableview) but I'd really prefer not to do that, as it would basically mean the UI is hardcoded and hard to change
- I'd prefer to create the interface programatically, but I don't know how easy it is to handle the different field types, attach popups (e.g. for datepickers for date fields), handle field events etc.
If someone has any pointers I could use, I'd really appreciate it.
TIA, Lucian