I am a new in iOS Development and I can´t move forwards… Is here somebody with experience, who can help me to solve my problem?
I use a Storyboard. First you see a ViewController with buttons. When you click on one of the button, informations about this button appear in a TableViewCell. – until now is it clear.
Than you click on a button “Continue” (than you come back to ViewController with buttons) and choose another button from ViewController.
HOW to do it, that informations from this button comes to a TableView as a second Cell? (so that when you click on for example three of the buttons, they appear as 3 cells under each other in this table?)
My Sample Code is here to download. – (on this website click on the smallest icon “Download”).
Thank you very very much for your help!!!
Iva
You need a
Modelto store your selections/data.For example: On
MainViewController, when you click onbutton1, record that in theModelusing array or just variable. Then, when you loadSecondViewController, check the values in Model and load cells accordingly.=> Example code for Model
Various options:
NSUserDefaultsto store information like settingsModelclass as described above – it could be a singleton classCoreDatato store and retrieve your data – complicated approach and suitable for dynamic thingsHere is a reference to a good Data Model tutorial (reported by Iva)