I’m brand new to Xcode and Objective-C, and fairly new to programming in general so please correct me if I have a severe misunderstanding.
Here’s what I’d like to accomplish:
-
Create a Table View (empty upon startup)
-
Have user add and name cells via a Bar Button (pushes to a different view with a name Text Field and “Create” button I’m assuming)
-
Each created cell pushes to a new Table View with similar add/naming functionality
-
Then each of those cells push to a Text View
It seems to me that the best way to accomplish the first part is by populating a string array, then assigning those elements to the corresponding cells. That’s where I get stuck.
-
How do I populate a Table View with an array?
-
Should I create a new secondary Table View for every cell, or just populate the same one differently depending on which parent cell is selected?
-
And same question as previous for the Text Views at the end of the chain…multiple Text Views or just different text passed each time?
If you got this far, I sincerely thank you and please let me know if I need to clarify anything.
I hope you know how to create a table view.
Now you should create a NSMutableArray to save your strings.
so your viewDidLoad will look like this.
Now the table view delegates
Now when you click on your barbutton to add new user, you must add it to strings array and just call
[tableview reloadData];I didn’t understand why you want a text view.
Hope this helps!