-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
if (indexPath.section % 2 == 0) {
static XLNShoppingCartTitleCell *cell = nil;
static dispatch_once_t onceToken;
//只会走一次
dispatch_once(&onceToken, ^{
cell = (XLNShoppingCartTitleCell *)[tableView dequeueReusableCellWithIdentifier:@"XLNShoppingCartTitleCell"];
});
CGFloat height = [cell calulateHeightWithtTitle:[self.dataSourceArray objectAtIndex:indexPath.section] desrip:[self.dataSourceArray objectAtIndex:indexPath.section]];
return height;
} else {
static XLNShoppingCTableViewCell *cell = nil;
static dispatch_once_t onceToken;
//只会走一次
dispatch_once(&onceToken, ^{
cell = (XLNShopping
{
if (indexPath.section % 2 == 0) {
static XLNShoppingCartTitleCell *cell = nil;
static dispatch_once_t onceToken;
//只会走一次
dispatch_once(&onceToken, ^{
cell = (XLNShoppingCartTitleCell *)[tableView dequeueReusableCellWithIdentifier:@"XLNShoppingCartTitleCell"];
});
CGFloat height = [cell calulateHeightWithtTitle:[self.dataSourceArray objectAtIndex:indexPath.section] desrip:[self.dataSourceArray objectAtIndex:indexPath.section]];
return height;
} else {
static XLNShoppingCTableViewCell *cell = nil;
static dispatch_once_t onceToken;
//只会走一次
dispatch_once(&onceToken, ^{
cell = (XLNShopping