Problem with Scrolling UITableView
Posted
by HiGuy Smith
on Stack Overflow
See other posts from Stack Overflow
or by HiGuy Smith
Published on 2010-04-19T14:22:34Z
Indexed on
2010/04/19
14:23 UTC
Read the original article
Hit count: 326
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
© Stack Overflow or respective owner