views:

124

answers:

2

I have a view controller that allows users to add an nsstring to an array that is the source for a uitableview directly underneath the add string uitextfield. I want to add the string to the uitablview as soon as its added to the backend array. ive tried a couple different things and im not really sure how to do it. my feeling is that i need to put a reloadData somewhere but im not sure when or where.

Any suggestions?

Thanks,

Nick

+2  A: 

I'd send the table view a reloadData message as soon as you've added the string to your backend array.

Giao
i actually have two view controllers on the same view so I had to reference one as an iboutlet inside the parent viewcontroller, works a treat thanks so much.
nickthedude
+1  A: 

Yes, just call [tableView reloadData] after you have added the item to the array. If that is not working then maybe something else is wrong.

St3fan