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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T01:18:13+00:00 2026-05-20T01:18:13+00:00

I have a problem with a tableview and a custom cell. I have the

  • 0

I have a problem with a tableview and a custom cell.

I have the following code :

- (void)viewDidLoad {
    [super viewDidLoad];
}

// =================================================================================================
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {

    return 1;
}

// =================================================================================================
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {

    return 1;
}

// =================================================================================================
// Customize the appearance of table view cells.
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"MyCustomCell";

    MyCustomCell *cell = (MyCustomCell*)[tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        UIViewController *c = [[UIViewController alloc] initWithNibName:CellIdentifier bundle:nil];
        cell = (MyCustomCell*)c.view;
        [c release];
    }

    return cell;
}

- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {

    MyCustomCell* theCell = (MyCustomCell*)cell;

theCell.theTextView.text = @"Label My Label";
}

// =================================================================================================
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 100; // -- In fact it's dynamic
}

Using that code, I have a strange behaviour on the simulator (iOS 4.2).
I have just one cell (grouped tableview). When I scroll the list to make the cell disapear at the top of the screen, and then when I let it free, instead of just scrolling down smoothly, the list suddenly reappears on the screen as if I had never scrolled it and then scroll a little bit (around 25px, to the top of my TextView in fact) to the top.

If I remove or comment theCell.theTextView.text = @”Label My Label”; then there are no problem enad the list acts as usual. The probelm does not exist if I only scroll a little bit to the top so the cell does not disapear. The problem is the same if I have many rows and make the first cell go over the top.

The TextView is inside the UITableCellView, and the textview is large enough to display the texte as a one-line text.

Can you see where is the problem ?

Please just comment to ask for additional informations or just suggestions if you don’t have the answer, to let other people see there is not yet an answer on this question.

Thank you for your help.

  • 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-20T01:18:14+00:00Added an answer on May 20, 2026 at 1:18 am

    The problem was that the “Scrolling enabled” property of the TextView was not set. Setting this property to “ON” and the problem is gone…

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

Sidebar

Related Questions

I have following problem: I've got an UITableView with 7 custom cells. Each of
I've got a little problem in my UITableViewCell. Each Custom Cell have an UISwitch
I have problem with return statment >.< I want to store all magazine names
I have problem compilin this code..can anyone tell whats wrong with the syntax CREATE
i have custom cell with 2 buttons(the function of these buttons is just to
I just have a quick best practice question regarding custom cells in a UITableView.
I have a custom view in a custom table cell. Every time a specific
I am facing this very weird problem, I have created a custom UITableViewCell on
I currently have a tableview with youtube videos embedded inside of the custom cells.
For my NSTableView, I have defined -tableView:toolTipForCell:rect:tableColumn:row:mouseLocation: and this does return the string I

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.