阅读背景:

我在单个屏幕中使用2个tableviews,一个是平面,第二个是自定义单元格。只有一个正在运作

来源:互联网 
NSString *cellIdentifier = @"cellID";

UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
if (tableView==self.monthTableVW)
{
    if (cell == nil)
    {
        cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
    }
    cell.textLabel.text=[self.monthArr  objectAtIndex:indexPath.row];
    cell.backgroundColor=[ UIColor colorWithRed:224.0f/255.0f green:188.0f/255.0f blue:113.0f/255.0f alpha:0.5f];
}
if (tableView==self.attendanceTBVW)
{
    customeCell *cell1=[[customeCell alloc]initWithStyle:UITableViewCellStyleValue1 reuseIdentifier:cellIdentifier];
    cell1=[tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if(cell==nil)
    {
        NSArray *cellArr=[[NSBundle mainBundle]loadNibNamed:@"customeCell" owner:self options:nil];
        cell=[cellArr objectAtIndex:0];
    }

    cell1.dateLbl.text=[self.monthArr objectAtIndex:indexPath.row];

}
return cell;
}
NSString *cellIdentifier = @"cellID";

UITableV



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: