0

I want to change the location of the minus image from the left side of the cell to the middle of it. Tried reading here: http://developer.apple.com/library/ios/#documentation/userexperience/conceptual/tableview_iphone/ManageInsertDeleteRow/ManageInsertDeleteRow.html but couldn't find an easy way for doing that.

Thanks

Ven
  • 19,015
  • 2
  • 41
  • 61
Segev
  • 19,035
  • 12
  • 80
  • 152
  • Simple way to achieve ur requirement is using custom cell. – Ganapathy Mar 06 '13 at 12:28
  • I have a custom cell and with willTransitionToState and didTransitionToState I managed to change the location of the minus BUT it only moves the minus image to the middle. The actuel button stays on the left side – Segev Mar 06 '13 at 12:32

1 Answers1

1

In your custom cell layoutSubviews method use:

if ([NSStringFromClass([subview class]) isEqualToString:@"UITableViewCellEditControl"]) {
        CGRect newFrame = subview.frame;
        //Use your desired x value
        newFrame.origin.x = 280;
        subview.frame = newFrame;    
}

as shown here https://stackoverflow.com/a/8512461/1747635.

Community
  • 1
  • 1
oridahan
  • 574
  • 1
  • 7
  • 20