Eduardito
Eduardito

Reputation:

TableView won't send setEditing message to cells

So far I have a UITableView, it works properly and all.

My problem is when going into "editing" mode, apparently the cells are not changing at all, and the red sign (delete control) only shows up when I drag the cell out of the tableview (meaning the iphone reloads the cell again, and it is here when it detects that the cell was "flagged" as editing).

The problem is right when I select "edit" button, red controls should show up but they don't.

I did implement the tableview's delegate method for returning a editing type control ( either an insert ot deletion) and no luck.

Upvotes: 1

Views: 2885

Answers (2)

Florian
Florian

Reputation:

Of course you can use a UIViewController.

in the setEditing:animate Method, simply call

[super setEditing:editing animated:animate];
[self.myTableView setEditing:editing animated:animate];

and you will get those nice little icons ;)

Upvotes: 3

Steve Gibson
Steve Gibson

Reputation: 801

Your Controller is probably a subclass of UIViewController not UITableViewController. As far as I have found thus far is you only get the "free" icons when subclassing a UITableViewController, which is not cool because you cannot mix visual elements on UITableViewController, you only have a tableView.

Upvotes: 0

Related Questions