0

I have an NSMutableArray to has the "many" side of a one-to-many relationship. I have it loaded into a UITableView. When I edit the table, by tapping "edit" I have the ability to add a new row to the table, which means add a new row to the NSMutableArray. The table Segue's to a new UITableView to allow the data to be entered. I want to be able to save the data into the NSMutableArray. What is the best way of doing this?

Thanks in advance.

1 Answer 1

4

To add objects to an NSMutableArray:

NSMutableArray * testArray;
testArray = [NSMutableArray arrayWithCapacity:10];
[testArray addObject:@"one"];
[testArray addObject:@"three"];
[testArray insertObject:@"two" atIndex:1];
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.