Show multiple data, after swipe in tableview cell











up vote
0
down vote

favorite












I am having a table view with some datas. While on left swipe of cell i want 'Delete' and 'Edit'. I got 'Delete' by using the below code. Please help me to solve this..



- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return NO;

}
return YES;
}

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
[self.circleGroupArray removeObjectAtIndex:indexPath.row];

[_myCircleTableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
}









share|improve this question






















  • With default methods, it won't be available, you can go with library like : github.com/MortimerGoro/MGSwipeTableCell
    – Viral Savaj
    yesterday












  • okay thank you.
    – sruthy
    yesterday










  • Possible duplicate of Custom edit view in UITableViewCell while swipe left. Objective-C or Swift
    – Teja Nandamuri
    yesterday















up vote
0
down vote

favorite












I am having a table view with some datas. While on left swipe of cell i want 'Delete' and 'Edit'. I got 'Delete' by using the below code. Please help me to solve this..



- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return NO;

}
return YES;
}

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
[self.circleGroupArray removeObjectAtIndex:indexPath.row];

[_myCircleTableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
}









share|improve this question






















  • With default methods, it won't be available, you can go with library like : github.com/MortimerGoro/MGSwipeTableCell
    – Viral Savaj
    yesterday












  • okay thank you.
    – sruthy
    yesterday










  • Possible duplicate of Custom edit view in UITableViewCell while swipe left. Objective-C or Swift
    – Teja Nandamuri
    yesterday













up vote
0
down vote

favorite









up vote
0
down vote

favorite











I am having a table view with some datas. While on left swipe of cell i want 'Delete' and 'Edit'. I got 'Delete' by using the below code. Please help me to solve this..



- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return NO;

}
return YES;
}

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
[self.circleGroupArray removeObjectAtIndex:indexPath.row];

[_myCircleTableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
}









share|improve this question













I am having a table view with some datas. While on left swipe of cell i want 'Delete' and 'Edit'. I got 'Delete' by using the below code. Please help me to solve this..



- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
if (indexPath.section == 0) {
return NO;

}
return YES;
}

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
if (editingStyle == UITableViewCellEditingStyleDelete) {
[self.circleGroupArray removeObjectAtIndex:indexPath.row];

[_myCircleTableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath] withRowAnimation:UITableViewRowAnimationFade];
}
}






ios objective-c






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked yesterday









sruthy

84




84












  • With default methods, it won't be available, you can go with library like : github.com/MortimerGoro/MGSwipeTableCell
    – Viral Savaj
    yesterday












  • okay thank you.
    – sruthy
    yesterday










  • Possible duplicate of Custom edit view in UITableViewCell while swipe left. Objective-C or Swift
    – Teja Nandamuri
    yesterday


















  • With default methods, it won't be available, you can go with library like : github.com/MortimerGoro/MGSwipeTableCell
    – Viral Savaj
    yesterday












  • okay thank you.
    – sruthy
    yesterday










  • Possible duplicate of Custom edit view in UITableViewCell while swipe left. Objective-C or Swift
    – Teja Nandamuri
    yesterday
















With default methods, it won't be available, you can go with library like : github.com/MortimerGoro/MGSwipeTableCell
– Viral Savaj
yesterday






With default methods, it won't be available, you can go with library like : github.com/MortimerGoro/MGSwipeTableCell
– Viral Savaj
yesterday














okay thank you.
– sruthy
yesterday




okay thank you.
– sruthy
yesterday












Possible duplicate of Custom edit view in UITableViewCell while swipe left. Objective-C or Swift
– Teja Nandamuri
yesterday




Possible duplicate of Custom edit view in UITableViewCell while swipe left. Objective-C or Swift
– Teja Nandamuri
yesterday












1 Answer
1






active

oldest

votes

















up vote
0
down vote













Use this method in your class, If you want more actions you can create more UITableViewRowActions and add them to array.



 -(NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {

UITableViewRowAction *editAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Clona" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
//add edit action here
}];
editAction.backgroundColor = [UIColor blueColor];

UITableViewRowAction *deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
//add delete action here
}];
deleteAction.backgroundColor = [UIColor redColor];
return @[deleteAction,editAction];
}





share|improve this answer





















    Your Answer






    StackExchange.ifUsing("editor", function () {
    StackExchange.using("externalEditor", function () {
    StackExchange.using("snippets", function () {
    StackExchange.snippets.init();
    });
    });
    }, "code-snippets");

    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "1"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














     

    draft saved


    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409131%2fshow-multiple-data-after-swipe-in-tableview-cell%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    Use this method in your class, If you want more actions you can create more UITableViewRowActions and add them to array.



     -(NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {

    UITableViewRowAction *editAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Clona" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
    //add edit action here
    }];
    editAction.backgroundColor = [UIColor blueColor];

    UITableViewRowAction *deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
    //add delete action here
    }];
    deleteAction.backgroundColor = [UIColor redColor];
    return @[deleteAction,editAction];
    }





    share|improve this answer

























      up vote
      0
      down vote













      Use this method in your class, If you want more actions you can create more UITableViewRowActions and add them to array.



       -(NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {

      UITableViewRowAction *editAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Clona" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
      //add edit action here
      }];
      editAction.backgroundColor = [UIColor blueColor];

      UITableViewRowAction *deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
      //add delete action here
      }];
      deleteAction.backgroundColor = [UIColor redColor];
      return @[deleteAction,editAction];
      }





      share|improve this answer























        up vote
        0
        down vote










        up vote
        0
        down vote









        Use this method in your class, If you want more actions you can create more UITableViewRowActions and add them to array.



         -(NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {

        UITableViewRowAction *editAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Clona" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
        //add edit action here
        }];
        editAction.backgroundColor = [UIColor blueColor];

        UITableViewRowAction *deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
        //add delete action here
        }];
        deleteAction.backgroundColor = [UIColor redColor];
        return @[deleteAction,editAction];
        }





        share|improve this answer












        Use this method in your class, If you want more actions you can create more UITableViewRowActions and add them to array.



         -(NSArray *)tableView:(UITableView *)tableView editActionsForRowAtIndexPath:(NSIndexPath *)indexPath {

        UITableViewRowAction *editAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Clona" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
        //add edit action here
        }];
        editAction.backgroundColor = [UIColor blueColor];

        UITableViewRowAction *deleteAction = [UITableViewRowAction rowActionWithStyle:UITableViewRowActionStyleNormal title:@"Delete" handler:^(UITableViewRowAction *action, NSIndexPath *indexPath){
        //add delete action here
        }];
        deleteAction.backgroundColor = [UIColor redColor];
        return @[deleteAction,editAction];
        }






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered yesterday









        Dinesh Gurrapu

        10511




        10511






























             

            draft saved


            draft discarded



















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53409131%2fshow-multiple-data-after-swipe-in-tableview-cell%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Lallio

            Futebolista

            Jornalista