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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T19:54:59+00:00 2026-05-18T19:54:59+00:00

I have cells in a table with custom fields that allow entry of numbers

  • 0

I have cells in a table with custom fields that allow entry of numbers using a custom numpad. That includes a tab. When tabbing from the bottom of the table to the top, I need to (i) scroll the table to the top and (ii) select the custom field in that table.

I’m finding that if I call cellForRowAtIndexPath directly after I’ve called scrollToRowAtIndexPath, the former returns a null cell. If called again, after the scroll has completed, the cell is returned as expected. I need the cell intself so I can get the custom view by tag value, and select it.

I have been trying to find a solution. One might be to insert a delay after the scroll to allow it to complete. But I’ve tried using performSlector:withObject:afterDelay without success.

This is my code called when the tab is pressed.

-(void) customDualViewTabbed:(CustomDualView *)dualView {

 UITableViewCell *cell=(UITableViewCell*)([dualView superview].superview);
 NSIndexPath *fromIndexPath=[self.tableView indexPathForCell:cell];
 NSIndexPath *toIndexPath;

 if ((fromIndexPath.row+1)<[self.tableView numberOfRowsInSection:fromIndexPath.section]){
  toIndexPath = [NSIndexPath indexPathForRow:(fromIndexPath.row+1) inSection:fromIndexPath.section];
 }
 else {
  toIndexPath = [NSIndexPath indexPathForRow:0 inSection:fromIndexPath.section];
  [[self tableView] scrollToRowAtIndexPath:toIndexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
 }

 //get cell we tabbed to
 cell=[self.tableView cellForRowAtIndexPath:toIndexPath];

 CustomDualView *dualView2 =(CustomDualView *)[cell viewWithTag:dualView.tag];

 [dualView2  setSelected:(SelectedState)SelectedLeftTabbed];
}
  • 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-18T19:55:00+00:00Added an answer on May 18, 2026 at 7:55 pm

    The cells in a UITableView are only loaded as needed. As a result, if the cell that you are scrolling to resides at an index that currently off-screen, you will get a nil response from cellForRowAtIndexPath.

    Now, since UITableview conforms to the UIScrollViewDelegate protocol, you can implement those delegate methods in addition to the UITableViewDelegate methods. Implementing one that you know will be called when your cell is in view, like scrollViewDidEndDecelerating:, and then making your call to cellForRowAtIndexPath might do the trick.

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

Sidebar

Related Questions

I have cells in a table with custom fields that allow entry of numbers
I have a grouped table view that utilizes two different custom table cells. When
I'm doing custom drawing in datagridview cells and I have items that can vertically
I have a table view on a view and table view contains custom cells
I have a table with custom table cells, is there any way of knowing
I have a table containing cells with text of various lengths. It is essential
I have have some code which adds new cells to a table and fills
If I have a table where the cells in a column should not have
I have quite a few cells that link to other worksheets/books, etc with standard
I have some data. I want to go through that data and change cells

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.