views:

18

answers:

1

Hello,

Is there a way to add delete controls, like in UITableViewCell, on a table section? I see two ways:

  • Use table cell instead of sections.
  • Write own UIView section class, which will show delete controls.

Regarding the first way - as I think, it could be an easiest way in my situation.

The second way may be better from the implementation point of view, but it will take more time.

May be I missed another way? Any suggestions?

A: 

The only way I see is to provide your UITableViewController Delegate or Subclass with the method called

- (UIView *) tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section

this gives you the power to display any kind of UIView as a section-header. within this view you can place controls that enable the user to delete sections.

I hope this helps a bit.

cheers

sam

samsam
Yep, this what the second option is in my post.
kovpas
From my point of view this is the most proper approach to solve your problem.
samsam
Ok, thanks. Will give it a try.
kovpas