PDA

View Full Version : Sample code for add button for tableView




GVKoenig
Aug 6, 2010, 08:13 PM
Hello to all,

I am looking for some sample code to show how to implement an 'Add' button
for a tableView. What I want is to be able to add rows to a table by using the 'Add' button.

I have looked through the sample code on Tables at the Apple Dev Center site but cannot seem to find anything pertaining to what i need. If anyone can direct me to a site with sample code that would be great.

Cheers!



pflau
Aug 6, 2010, 10:25 PM
Hello to all,

I am looking for some sample code to show how to implement an 'Add' button
for a tableView. What I want is to be able to add rows to a table by using the 'Add' button.

I have looked through the sample code on Tables at the Apple Dev Center site but cannot seem to find anything pertaining to what i need. If anyone can direct me to a site with sample code that would be great.

Cheers!

Why don't you do it in Interface Builder? Attach an event to the button (touch up inside) that would update the data model and call reloadData on the table view controller.