Drag right to make Delete button appear?

Discussion in 'iOS Programming' started by pinsrw, Nov 17, 2010.

  1. pinsrw macrumors regular

    Joined:
    May 30, 2010
    #1
    Hi all,

    I've noticed that some apps from Apple have this great feature, whereby in a table the user drags right, then a red Delete button appears that they can use or not.

    Is that a standard part of the iOS GUI, or something custom that's only used in-house by Apple?

    Thanks.
     
  2. KoolStar macrumors demi-god

    KoolStar

    Joined:
    Oct 16, 2006
    Location:
    Kentucky
    #3
    You need to implement the following methods.
    Code:
    – tableView:willBeginEditingRowAtIndexPath:
    – tableView:didEndEditingRowAtIndexPath:
    – tableView:editingStyleForRowAtIndexPath:
     
  3. cnstoll macrumors 6502

    Joined:
    Aug 29, 2010
    #4
    Don't forget "commitEditingStyle" if you want those changes to be reflected in your data source.
     

Share This Page