views:

450

answers:

1

Hi, iphone problem.

http://errorimages.s3.amazonaws.com/weird_cell.png

I am in editing mode. The dark grey is an imageView, that it seems being pushed by the reorder icons, and you can see the UIview in the background (light grey).

I do not like this to happen.

What do you think?

+1  A: 

Are you wanting to hide the reorder button and its views? If so, you can override the didTransitionToState method in your custom UITableView like so:

- (void)didTransitionToState:(UITableViewCellStateMask)state
{
//modified from comments here:
//http://www.erasetotheleft.com/post/overriding-the-drag-reorder-control-in-uitableviewcell/

 if(state == UITableViewCellStateEditingMask)
 {
  for (UIControl *control in self.subviews)
  {
   // Find the Reorder Control
   if ([control isMemberOfClass:NSClassFromString(@"UITableViewCellReorderControl")] && [control.subviews count] > 0)
   {
    // Create Pointer to Reorder Controls Image View
    UIImageView *imageView = [control.subviews objectAtIndex:0];

    // Set Image Views Hidden Property to NO
    imageView.hidden = YES;
   }
  }
 }
}
Bryce
I want that my dark grey imageView will not be pushed left when i go into edit mode.
donodare