views:

772

answers:

2

I am devloping a game in which I am using a UITableView which has customCell (UItableViewCell).

In editing mode: Only the reordering control of the UITableView should show.

Right now i am getting the delete and the reordering control.

How to get only reordering control while editing ???????

A: 

tableView.showsReorderControl = YES; // to show reordering control

To dissmiss delete control, in your UITableViewDelegate add

- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath
{
    return UITableViewCellEditingStyleNone;
}
oxigen
A: 

thanks a lot oxigen it worked .... i was writing this in

  • (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

static NSString *CellIdentifier = @"Cell";

UITableViewCell *cell = [tableView1 dequeueReusableCellWithIdentifier:CellIdentifier];

if (cell == nil) { cell = [[[UITableViewCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease]; }

cell.showsReorderControl = YES; // to show reordering control }

but i dint write the method which you have given

Thanks a tons

sneha