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

  • Home
  • SEARCH
  • 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 1099221
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T00:42:05+00:00 2026-05-17T00:42:05+00:00

I have a plist file that is brought into a tableview, and now want

  • 0

I have a plist file that is brought into a tableview, and now want to remove items that I have added in the past, but don’t even know where to start. I have got the editing working, well it shows on each line, any help more than welcome on this!

    - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return amounts.count;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    //Create Cell
    UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"cell"];

    //Fill cell
    NSDictionary *budgetItem = [amounts objectAtIndex:indexPath.row];
    currentNumber = [[budgetItem objectForKey:@"Value"] floatValue];

    NSString *imageFile = [[NSBundle mainBundle] pathForResource:@"mini" ofType:@"png"];
    UIImage *ui = [[UIImage alloc] initWithContentsOfFile:imageFile];
    cell.imageView.image = ui;
    result = result + currentNumber;


    cell.textLabel.text = [NSString stringWithFormat:@"£%.2f",currentNumber];
    NSString *detailTxt = [NSString stringWithFormat:@"%@ - %@", [budgetItem objectForKey:@"Description"], [budgetItem objectForKey:@"Date"]];
    cell.detailTextLabel.text = detailTxt;

    //Return it
    return cell;
}

// Override to support conditional editing of the table view.
- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
    // Return NO if you do not want the specified item to be editable.
    return YES;
}


- (void) loadData{

    //Get file location
    NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
    NSString *documentsDirectory = [paths objectAtIndex:0];
    NSString *path = [documentsDirectory stringByAppendingPathComponent:@"saveBudget.plist"];

    // Load items
    NSString *error;
    NSPropertyListFormat format;
    NSData *plistData = [NSData dataWithContentsOfFile:path];
    NSArray *amountData = [NSPropertyListSerialization propertyListFromData:plistData mutabilityOption:NSPropertyListImmutable format:&format errorDescription:&error];

}

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
    [super viewDidLoad];
    [self loadData];

    // Add Edit Button
    self.navigationItem.rightBarButtonItem = self.editButtonItem;

}

- (void) setEditing:(BOOL)editing animated:(BOOL)animated {
    [super setEditing: editing animated: animated];
    [dataTable setEditing:editing animated:animated];
}
  • 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-05-17T00:42:06+00:00Added an answer on May 17, 2026 at 12:42 am

    You read data from you file into a mutable container (an array most likely). Then you make changes to the container in response to user actions using the methods that are provided through UITableView. Next, write the container back out again to disk.

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

Sidebar

Related Questions

I have a TableView with 10 sections that are loaded from a plist file
I have a plist file in my application data that i want to update
I have a plist file that I am reading out a measurement, but some
I have a plist file in my main app bundle that I want to
I have a .plist file that is loaded into my Xcode project. I have
I have a plist file and i want edit this file, but setObject() in
I have successfully created an app that reads from a bundled .plist file and
So I have a plist structured string, that get dynamically (not from the file
I have a PLIST file that stores issue information. At the top is an
Hey guys I have an array of dictionaries plist file that I am reading

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.