Note that there are some explanatory texts on larger screens.

plurals
  1. POcellForRowAtIndexPath doesn't run at all for tableview in xcode
    text
    copied!<p>I'm trying to write an app that will have a custom tableviewcell so i followed the apple developer sample code, but when i run my app, the screen is completely white. When I put breakpoints/NSLogs in the numberOfSectionsInTableView, numberOfRowsInSection, or the cellForRowAtIndexPath, nothing shows.</p> <p>Here is my delegate.m</p> <pre><code>RootViewController *rootViewController = [[RootViewController alloc]initWithStyle:UITableViewStylePlain]; rootViewController.displayList=[self displayList]; UINavigationController *aNavigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController]; self.navigationController=aNavigationController; [aNavigationController release]; [rootViewController release]; [window addSubview:[navigationController view]]; [self.window makeKeyAndVisible]; </code></pre> <p>And this is the cellForRowAtIndexPath in my RootViewController.m</p> <pre><code>- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ static NSString *CellIdentifier = @"TableCell"; TableCell *tableCell = (TableCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (tableCell == nil) { tableCell = [[[TableCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; tableCell.frame=CGRectMake(0.0, 0.0, 320.0, 60); } NSLog(@"71"); return tableCell; </code></pre> <p>}</p> <p>I know that the cellForRowAtIndexPath won't show if there are no rows, but shouldn't the numberOfRowsInSection at least work? I even commented the numberOfRowsInSection out and the app was still able to build (still blank though)</p> <p>Thanks</p>
 

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