خرید بک لینک

Vote count: 0

I have two different custom cell in my tableview, In the first cell I add a custom cell line under the system cell line:

_bottom_line = [[UIView alloc] initWithFrame:CGRectMake(0, 49, kScreen_Width, 1)];
_bottom_line.backgroundColor = Back_Color_QQ;
[part3 addSubview:_bottom_line];

In the controller to setup my custom cell;

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    if (indexPath.section == 0) {  // my first cell

        static NSString *id_cell1 = @"cell1";
        AgDetailTechCell *cell = [tableView dequeueReusableCellWithIdentifier:id_cell1];
        if (cell == nil) {
            cell = [[AgDetailTechCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:id_cell1];
        }

        ((AgDetailTechCell *)cell).model = self.headerModel;
        ((AgDetailTechCell *)cell).indexPath = indexPath;
        ((AgDetailTechCell *)cell).delegate = self;
        _head_cell = cell;

        _head_cell.comemntCountlabel.text = self.headerModel.lml_commentTimes;
        _head_cell.likeCountlabel.text = self.headerModel.lml_likeTimes;

        return cell;
    }else {  // other cells

        static NSString *id_cell2 = @"cell2";
        AgPreOrHelpCommentCell *cell = [tableView dequeueReusableCellWithIdentifier:id_cell2];
        if (cell == nil) {
            //cell = [[AgPreOrHelpCommentCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:id_cell2];
            cell = [[NSBundle mainBundle] loadNibNamed:@"AgPreOrHelpCommentCell" owner:self options:nil].firstObject;
        }
        cell.delegate = self;
        cell.indexPath = indexPath;
        [cell initCellDataWithModel:self.dataSource[indexPath.row]];


        cell.refresh = ^(UITableViewCell *currentCell) {


            [self.tableView reloadData];

             [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionMiddle animated:NO];

        };


        return cell;
    }

}

The first time into the controller, it shows well. But after I scroll my tableview to hide and show again, my custom bottom line dismiss, I caot find it.I have token 2 pictures to explain more detail:

First time into the controller it shows well After scroll my tableview and show the line ,it dismss

asked 10 secs ago

برچسب: نویسنده: استخدام کار تاريخ: پنجشنبه 21 مرداد 1395 ساعت: 10:10

صفحه بندی