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 9042533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:31:01+00:00 2026-06-16T10:31:01+00:00

Happy 14th Baktun everybody! This thing has been bugging me for a while, and

  • 0

Happy 14th Baktun everybody!

This thing has been bugging me for a while, and I’ve googled to and fro, and also checked SO for an answer, but I just can’t seem to grasp the answers and apply it to my app. If some of you would be so kind to help out, that would be appreciated!

I got the following function that deletes a cell from an UITableView when a stepper reaches 0.
I want the cell to be animated to the left, so when you press the – sign you’ll see the cell swipe out of view. I set the sender.tag to the [[cell stepper]setTag:indexPath.row]; in CellForRowAtIndexPath.

  - (void)stepperChanged:(UIStepper *)sender
{

    WinkelWagen *ww = [WinkelWagen sharedWinkelWagen];
    BWBand *band = [ww.winkelWagenArray objectAtIndex: sender.tag];
    NSDecimalNumber *nummer = [[NSDecimalNumber alloc]initWithFloat:sender.value];
    band.winkelmandjeAantal = nummer;
    [sender setValue:[band.winkelmandjeAantal doubleValue]];

    // Remove the cell and object from WinkelWagen if stepper.value turns 0
    if (sender.value == 0)
    {
        NSArray *deleteIndexPaths = [NSArray arrayWithObjects:
                                     [NSIndexPath indexPathForRow:sender.tag inSection:0],
                                     nil];
        [ww.winkelWagenArray removeObject:band];
        [self.tableView beginUpdates];
        [self.tableView reloadData];
        [self.tableView deleteRowsAtIndexPaths:deleteIndexPaths withRowAnimation:UITableViewRowAnimationNone];

        if ([winkelmandjeData count] == 0)
        {
            NSArray *addIndexPaths = [NSArray arrayWithObjects:
                                      [NSIndexPath indexPathForRow:0 inSection:0],
                                      nil];
            [self.tableView insertRowsAtIndexPaths:addIndexPaths withRowAnimation:UITableViewRowAnimationFade];
        }
        [self.tableView endUpdates];
    }
}

UPDATE:
I’ve worked it out with [[self.tableview]reloaddata] but then the animation doesn’t play. Can someone tell me how I should handle the data and the animation properly?

Thanks!

  • 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-16T10:31:03+00:00Added an answer on June 16, 2026 at 10:31 am

    I see there something you could have a problem with, but don’t know if it is an answer to your question. In your if ([shoppingCartData count] == 0) you are adding a row to the table, but the data source remains the same. That could result in a crash.

    Also, before the if, your data source seem to be ww.shoppingCartArray, but in the if you are checking the count of shoppingCartData.

    Hope this helps!

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

Sidebar

Related Questions

Happy Friday! I assume somebody out there has a simple answer to this question
I've been a happy tmux user for a while now but there's one behaviour
Happy thanksgiving all: I've been racking my brain around this one for a half
Happy holidays, all. I'll probably feel very silly when I get the answer to
Happy Friday — Does anyone know if eclipse has the notion of smart quotes
I have been happy serializing with javascript objects into JSON using JSON.stringify And sending
I'd been happy using my debug statements until recently I upgraded Xcode and now
I have never been happy with the code on my custom CursorAdapter until today
Happy New Year Everyone! I have this existing php code I did when I
Happy New Year everybody,now I am trying to develop my own bot( web crawler

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.