Editing a table like iPhone Mail
<p>The iPhone Mail application has an edit button in the navigation bar. Tapping that button shows a delete button in the toolbar and shows checkbox controls in the table cells. Tapping one or more checkboxes then tapping the delete button causes the checked messages to be deleted.</p>

<p>How can I add similar functionality to my own code?</p>

<p>Here's a screenshot of the effect I'm looking for:</p>

<p><img src="http://www.freeimagehosting.net/uploads/add199aa62.png" alt="screenshot of spam folder with some messages checked"></p>
