mardi 23 juin 2015

Separator line issues - uitableview cells with different heights

I have a UITableView with different cell heights. I have added a custom separator line also using the following code

UIView* separatorLineView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 1)];
separatorLineView.backgroundColor = [UIColor grayColor];
[cell.contentView addSubview:separatorLineView];

When i scroll my table extra separators appear between the rows and i dont understand why? Am i missing something? help me out. In short UITableView displays separator at wrong position for some cells. Have attached an example image for reference.

P.S: I AM NOT USING AUTOLAYOUT

enter image description here

See more ..

Aucun commentaire:

Enregistrer un commentaire