Note that there are some explanatory texts on larger screens.

plurals
  1. POUITableView crashing on scroll
    text
    copied!<p>This is the code i have:</p> <pre><code>- (id)init { self = [super initWithStyle:UITableViewStylePlain]; if (self) { //self.tableView.delegate = self; } return self; } - (void)viewDidLoad { [super viewDidLoad]; UIColor *wood = [UIColor colorWithPatternImage:[UIImage imageNamed:@"wood_pattern.png"]]; self.view.backgroundColor = wood; self.tableView.separatorColor = [UIColor clearColor]; } #pragma mark - Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return 3; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; cell.backgroundView.backgroundColor = [UIColor redColor]; } // Configure the cell... cell.textLabel.text = @"Test"; cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; return cell; } #pragma mark - Table view delegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { } -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath { return 60; } </code></pre> <p>When i scroll down and then back up to a cell which was previously on screen, the app crashes. Any ideas why?</p> <p>On a side note.. the background color is set to red, and although i can see the text, I can't see the background color.</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