0

I want to handle swiping event inside the cell in order to set alpha value of delete button increasing gradually.

I would like to have like this:

while swiping

end swiping

As It is seen in the image, while swiping the cell through the left side, editing buttons' alpha increases. And finally It is set to 1.0. How can I implement increasing alpha on swiping using default red delete button? Note: I have followed the Bradens' answer to handle delete button inside the cell in iOS 6/7.

Community
  • 1
  • 1
T.Y. Kucuk
  • 447
  • 8
  • 24

1 Answers1

1

Try to use SWTableViewCell, and try to change the alpha value when user is swiping.

- (NSArray *)rightButtons
{
    NSMutableArray *rightUtilityButtons = [NSMutableArray new];
    [rightUtilityButtons sw_addUtilityButtonWithColor:
    [UIColor colorWithRed:0.78f green:0.78f blue:0.8f alpha:1.0]
                                            title:@"More"];
    [rightUtilityButtons sw_addUtilityButtonWithColor:
    [UIColor colorWithRed:1.0f green:0.231f blue:0.188 alpha:1.0f]
                                            title:@"Delete"];

    return rightUtilityButtons;
}

my guess would be to set and reset alpha from

- (void)swipeableTableViewCell:(SWTableViewCell *)cell scrollingToState:(SWCellState)state

P.S, i did not try this library before.

B.I.A
  • 700
  • 1
  • 7
  • 20