I found that the first time UITableView is launched, it does not respond to scrolling strokes - if it has no more lines than on the screen. If I close the view, then open the same object again - it will now respond to touches - although it contains the same number of lines.
I am not doing anything other than responding to UITableViewDataSource methods for the number of rows and creating the rows themselves. I reload the table every time a view appears.
Can someone explain this behavior?
I create cells like this:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *tableId = @"NewIndexTableId"; Note *note = [notes objectAtIndex:[indexPath row]]; UITableViewCell *cell = [self.tableView dequeueReusableCellWithIdentifier:tableId]; if (cell == nil) cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:tableId] autorelease]; cell.textLabel.text = note.text; cell.detailTextLabel.text = [note changedDelta]; cell.accessoryView = multipleAccounts ? [note.account imageView] : nil; return cell; }
source share