UITableView -> Mail App like Multi Row Edit

Discussion in 'iOS Programming' started by Boesesreh, Aug 5, 2009.

  1. Boesesreh macrumors newbie

    Joined:
    Aug 5, 2009
    #1
    Hi guys I'm new here with a pretty tricky question.
    I want my table view to be edited like the one in the mail app does. (MultiRowSelection and two buttons at the bottomI). But i cant seem to find out how to do this ... I found a tutorial to do it manually (would post it but i don't quiet know if links are allowed here) but i thougth that there has to be an easy way how to do this. e.g the App remember the milk does it exactly the same way like the mail app except for the fact that they customised the deletet behavior.

    It would be great if anybody could help me with that.
     
  2. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #2
    Links are allowed, as long as they're not just for the purpose of driving traffic to another site. So, post away!
     
  3. Boesesreh thread starter macrumors newbie

    Joined:
    Aug 5, 2009
    #3
    I could bite my ass -.-
    the solution for my problem is on the same damn page xD
    http://iphonedevelopment.blogspot.com/2009/08/multi-row-delete-in-30.html
    I just clicked the wrong link so i got the 2.0 version which is a little bit more writing.

    So -> Problem Solved
    For everybody with the same problem ->
    http://networkpx.blogspot.com/2009/07/multiple-row-selection-with-uitableview.html

    And thanks for making me google that again.

    If anybody wonders why a couldnt figure that out myself: In the class Reference the enumeration for
    - (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath;
    hasn't been updated yet so the only three options in the UITableViewCellEditingStyle enumeration are
    UITableViewCellEditingStyleNone,
    UITableViewCellEditingStyleDelete,
    UITableViewCellEditingStyleInsert
    but if you return a simple "3" it will let you select multiple rows
     
  4. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #4
    Ah, so it's there, but it's just undocumented. You'll want to be careful with those since undocumented API use is not supported by Apple and even could be the basis for your app being rejected, since using them violates the SDK agreement.
     
  5. Boesesreh thread starter macrumors newbie

    Joined:
    Aug 5, 2009
    #5
    Since the app is'nt supposed to be published via the app-store I don't think that this is going to be a problem.
     

Share This Page