Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9126233
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:59:29+00:00 2026-06-17T06:59:29+00:00

This question is bit related to my earlier question I am newbie for iPhone

  • 0

This question is bit related to my earlier question

I am newbie for iPhone application and trying to learn UITableView with JSON. I followed this video for learning.

I created same example using Stoaryboard and also added new screen where I can add data. Now I was trying to delete the data. So what I did is thought is instead of below method, I will add button on each row and on clicking of that I will delete the data.

- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath

But I am not getting how I will get the row details and how to delete.

Any help/ suggestion would be grateful.

Below is how my screen looks like.

enter image description here

Note:

The UITableViewCell is of CUSTOM type.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:59:30+00:00Added an answer on June 17, 2026 at 6:59 am

    Update the data model according to edit actions delete using bellow code.

    This bellow code is just an example for hot to delete or remove the object from array and also from table .. for more info check the tutorial which i post the link bellow..

    - (void)tableView:(UITableView *)aTableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
    
         if (editingStyle == UITableViewCellEditingStyleDelete) {
    
             [arryData removeObjectAtIndex:indexPath.row];
    
            [tblSimpleTable reloadData];
    
         } 
    }
    

    or also using this bellow logic with custom button of cell…

    - (IBAction)deleteCustomCellWithUIButton:(id)sender
    {
      NSIndexPath *indexPath = [yourTableView indexPathForCell:(UITableViewCell *)[[[sender superview] superview] superview]];
      NSUInteger row = [indexPath row];
      [yourTableView removeObjectAtIndex:row];
      [yourTableView deleteRowsAtIndexPaths:[NSArray arrayWithObject:indexPath]  withRowAnimation:UITableViewRowAnimationFade];
    }
    

    For more info refer these tutorial…

    1. iphone-sdk-tutorial-add-delete-reorder-UITableView-row

    2. multiple-row-selection-and-editing-in

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry if this question seems a bit complex but I think its all related
this is a bit related to this question . I'm using make to extract
This question is related to Array of pairs of 3 bit elements This array
This question is related to ActionScript 3.0 and Flash CS6 I am trying to
This question is related to another question that I posted on SO earlier How
Related to this question: Use with XMLVM to convert android app to iphone app
This is tangentially related to an earlier question of mine. Essentially, the solution in
slightly related to this question here . My problem: I am writing a bit
This is a bit of a follow-on question, related to an answer I saw
This question is a bit related to one I posed previously entitled Recognizing UIButton

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.