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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T13:20:02+00:00 2026-05-15T13:20:02+00:00

I have a generic UISplitViewController (UITableView in the RootViewController and other stuff in the

  • 0

I have a generic UISplitViewController (UITableView in the RootViewController and other stuff in the detail view)

I have modified UITableViewCells in 2 ways:

  1. The rows have a height of 55
  2. The UITableViewCells contain both a UIImage and UILabel

There are 50 rows total

PROBLEM: When I launch the app, the first 13 rows (the ones that are visible) DO NOT DISPLAY. I get empty rows.

If I scroll away from the first 13 rows and then scroll back…THEY APPEAR.

Any thoughts on what I’m doing wrong?

Here’s my relevant code (I omitted general stuff like dealloc).

////////// header file /////////////////////////
#import <UIKit/UIKit.h>

@class c_cell;  // my custom UITableViewCell class (with cell height of "55")
@class DetailViewController;

@interface RootViewController : UITableViewController {
    DetailViewController *detailViewController;
    IBOutlet c_cell *cc;
    NSArray                 *cell_names;
    NSArray                 *cell_tlas;
}

@property (nonatomic, retain) IBOutlet DetailViewController *detailViewController;

@property (nonatomic, retain) IBOutlet c_cell   *cc;
@property (nonatomic, retain) NSArray *cell_names;
@property (nonatomic, retain) NSArray *cell_tlas;

@end


/////////////////  end header file /////////////////////

implementation file

  #import "RootViewController.h"
    #import "DetailViewController.h"
    #import "c_cell.h"


    @implementation RootViewController

    @synthesize detailViewController;

    @synthesize cc;
    @synthesize cell_names;
    @synthesize cell_tlas;


    #pragma mark View lifecycle

    - (void)viewDidLoad {
        [super viewDidLoad];
        self.clearsSelectionOnViewWillAppear = NO;
        self.contentSizeForViewInPopover = CGSizeMake(320.0, 600.0);

    }

    - (void)viewWillAppear:(BOOL)animated { 
        if (!self.cell_names) {
            self.cell_names = [NSArray arrayWithObjects:
                                  @"123",
                                  @"456",
                                  @"789", nil];     // 50 records in total...not just 3 as shown here
        }

        if (!self.cell_tlas) {
            self.cell_tlas = [NSArray arrayWithObjects:
                                 @"aaa",
                                 @"bba",
                                @"cca", nil]; // 50 records in total...not just 3 as shown here
        }
    }


    #pragma mark Table view data source
    - (NSInteger)numberOfSectionsInTableView:(UITableView *)aTableView {
        return 1;
    }


    - (NSInteger)tableView:(UITableView *)aTableView numberOfRowsInSection:(NSInteger)section {
        return 50;
    }

    - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
        return 55;
    }

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
        c_cell *cell   = (c_cell *)[tableView dequeueReusableCellWithIdentifier:@"ccc"];  // c_cell is my custom cell class
        if (!cell) {
            [[NSBundle mainBundle] loadNibNamed:@"c_cell" owner:self options:nil];
            cell = self.cc;
        }

        NSString *cell_string           = [self.cell_names objectAtIndex:indexPath.row];
        NSString *cell_tla              = [self.cell_tlas objectAtIndex:indexPath.row];
        NSString *cell_image_name       = [NSString stringWithFormat:@"%@.png", cell_tla];
        cell.cell_image.image           = [UIImage imageNamed:cell_image_name];
        cell.cell_label.text            = cell_string;

        return cell;
    }



    @end
  • 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-15T13:20:02+00:00Added an answer on May 15, 2026 at 1:20 pm

    At the bottom of viewWillAppear, add [[self tableView] reloadData];

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

Sidebar

Related Questions

I have a generic list view in Django which returns around 300 objects (unless
I have generic list which must be a preserved order so I can retrieve
I have generic type that looks like: public class GenericClass<T, U> where T :
I want to write in Delphi (2009 - so I have generic dictionary class)
I am aware of Web Services and WCF but I have generic question with
Is there any name for the following DB table design: Basically we have generic
I have a Generic List object which hold below table as its own value.
I have a generic linked-list that holds data of type void* I am trying
I have a Generic Base Class that I want to allow one of two
I have seen generic repository pattern here . I am trying to add generic

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.