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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:31:37+00:00 2026-05-27T19:31:37+00:00

Inside each UITableViewCell of my UITableView , I have a UIScrollView . The scroll

  • 0

Inside each UITableViewCell of my UITableView, I have a UIScrollView. The scroll view is setup so that when the user swipes right a menu will appear. This is similar to the behavior of the cells in the iPhone Twitter app. When a user swipes upon another cell I iterate over all visible cells to tell the UIScrollView to scroll back to the cell content (i.e. its initial position). The iteration is done in the scrollViewWillBeginDragging method with the following code:

   - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView {

        if( [scrollView tag] == 90 ) {

            NSLog(@"Dragging a scroll view inside a cell!");

            for (UITableViewCell *cell in self.tableView.visibleCells) {

                [(UICellContentScrollView *)[cell viewWithTag:90] scrollRectToVisible:CGRectMake(0.0f, 0.0f, 320.0f, [cell frame].size.height) animated:YES];

            }

        }

    }

In the method viewDidDisappear I iterate again over all cells to reset various things like so:

- (void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];


    for( NSUInteger section = 0; section < [[self tableView] numberOfSections]; section++ ) {

        for( NSUInteger row = 0; row < [[self tableView] numberOfRowsInSection:section]; row++ ) {

            UITableViewCell *cell = [[self tableView] cellForRowAtIndexPath:[NSIndexPath indexPathForRow:row inSection:section]];
             // resetting cell here

        }

    }

}

My question is if I am (a) going about this the right way and (b) does anyone have any recommendations on a better solution considering the table view may be storing up 50 (no more than 100) items.

  • 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-27T19:31:38+00:00Added an answer on May 27, 2026 at 7:31 pm

    Check out the NSNotification documentation. You could register all of your UITableViewCell objects to receive a notification you could call something like “cellWasSwiped” or “needToResetCells” or whatever. Then whenever you want to reset the cells you just post the notification. All of your UITableViewCell objects that are registered to receive it will get the notification and can then call whatever method you need.

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

Sidebar

Related Questions

I have several UITextFields on my view (each inside a UITableViewCell). When the keyboard
I have one iphone application in which i am adding uitableview inside uitableviewcell.in that
I keep finding that if I have nested divs inside each other, and one
I have this code which will include template.php file from inside each of these
I have a UIButton that is created inside of each table cell. I want
I have three UITableViews that should look identical. Each is placed inside a different
I currently have a UIScrollView with multiple UIView inside. And inside each UIView I
I have an XML document that has several <item> elements. Inside each, there might
I have a set of data inside a dictionary and inside - (UITableViewCell *)tableView:(UITableView
I have an application that uses a UITabBarController, and inside each tab I have

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.