views:

649

answers:

2

I have three sections in my hypothetical UITableView. I'd like one section that is in editing mode. The rest of the sections to not be in editing mode. Is this possible at all?

+7  A: 

This really shouldn't be a mystery, as it's spelled out clearly in the documentation. Simply use the datasource method

- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath
August
Thanks - I was just looking for this myself and it was much easier to find it here than in the docs :-)
Phil Nash
jamone
A: 

How can i implement this?

Can you put a exemple for me?

Thank you

You must have an object that you have appointed as the table view's data source. In the class for that object, write the instance method that August presented the signature for. It must have that exact signature. The table view will send your data source object that message to ask whether the user should be allowed to edit that row. Return `YES` when it asks you about the row that you want to allow editing for; return `NO` when it asks you about any other row. For more info, see the docs: http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UITableViewDataSource_Protocol/
Peter Hosey
Furthermore, when you want to ask a question, you should ask it as a question, not as an answer on another question, which is what you've done here.
Peter Hosey