Note that there are some explanatory texts on larger screens.

plurals
  1. POTable View data not showing in new storyboard scene in iOS6 and Xcode
    primarykey
    data
    text
    <p>I am trying to implement a second scene for the first time and I'm having some issues. Simply trying to display a block of cells in a table view with data from an array. Very similar code to my first scene which is why I'm puzzled as to why it's not working.</p> <p>Code is below:</p> <pre><code>#import "ChooseServerView.h" #import "ViewController.h" @interface ChooseServerView () @end @implementation ChooseServerView; @synthesize serverSelection; - (void)viewDidLoad { serverSelection = [[NSArray alloc] initWithObjects:@"Chicgo, IL",@"London, UK",@"San Jose, CA",@"Washington, DC", nil]; [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. } #pragma mark - Table View Methods - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView; // Default is 1 if not implemented { return 2; } - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section; // fixed font style. use custom view (UILabel) if you want something different { if (section == 0) { return @"Standard Test Locations:"; } else { return @"Quality Test Locations:"; } } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section; { if (section == 0) { return [serverSelection count]; } else { return 1; } } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; { UITableViewCell *stdLocCell = nil; stdLocCell = [tableView dequeueReusableCellWithIdentifier:@"serverSelection"]; if (stdLocCell == nil) { stdLocCell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"serverSelection"]; } switch (indexPath.section) { case 0: stdLocCell.textLabel.text = [serverSelection objectAtIndex:indexPath.row]; break; case 1: stdLocCell.textLabel.text = @"Speed Test"; break; default: break; } return stdLocCell; } @end </code></pre> <p>The segue works as expected, the naviagation and tab bar appear but no cells or data, just blank.</p> <p>There is a note in the output when moving to the new scene that says:</p> <blockquote> <p>2013-01-03 13:08:34.878 MyConnection[15996:907] Unknown class GLKView in Interface Builder file.</p> </blockquote> <p>Not sure if that has anything to do with the lack of data or not.</p> <p>New Class controller is connected to the new scene on the storyboard and appears in the compile instructions as shown below:</p> <p><img src="https://i.stack.imgur.com/jnVKl.png" alt="Compile Sources"></p> <p><img src="https://i.stack.imgur.com/DOcYt.png" alt="Custom Class"></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload