When i scroll my table its crash.
help someone?
Code:
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return [self.list count];
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
CustomCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil) {
cell = [[[CustomCell alloc] initWithFrame:CGRectZero reuseIdentifier:CellIdentifier] autorelease];
}
switch (indexPath.row) {
case 0:
cell.Label.text = [[self.list objectAtIndex:indexPath.row]retain];
cell.imageView.image = [self.picArr objectAtIndex:0];
break;
case 1:
cell.Label.text = [[self.list objectAtIndex:indexPath.row]retain];
cell.imageView.image = [self.picArr objectAtIndex:0];
break;
case 2:
cell.Label.text = [[self.list objectAtIndex:indexPath.row]retain];
cell.imageView.image = [self.picArr objectAtIndex:0];
break;
.
.
.
default:
break;
}
cell.accessoryType=UITableViewCellAccessoryDisclosureIndicator;
return cell;
help someone?