Si Te Feng
Si Te Feng

Reputation: 190

UITableViewCell Separator line misalignment

When I set tableView.rowHeight to 57, one of the cells always have the wrong row height. What could be the reason? Also I've tried implementing the delegate method as well with no luck. enter image description here

Upvotes: 0

Views: 118

Answers (2)

sanginadham murali
sanginadham murali

Reputation: 266

your custom cell height and heightForRowAtIndexPath returned height should be same. suppose custom cell height is 65.and

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 65f;
}

Upvotes: 0

In your view controller just implement the following delegate method

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 57f;
}

Upvotes: 1

Related Questions