Problem with Scrolling UITableView
- by HiGuy Smith
Hello, I have a navigation-based application that has a scrolling UITableView filled with the contents of a directory. Somehow, when I try to scroll a new cell into view, the application crashes. I have determined that it goes down to these lines of code in - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {:
NSString *cellText = [contentArray objectAtIndex:indexPath.row];
cell.textLabel.text = cellText;
Now why this is crashing, I don't know. contentArray is a NSArray with the table data. If you need a bit more code to tell:
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
return 1;
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [contentArray count];
}
Please help me with this problem,
HiGuy