KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
This seems like an easy problem, but I've hit a brick wall finding a solution and I'm hoping someone on here can help... I am making a UITableView using UITableViewStyleGrouped, and I am seeing a small (1 pixel) white line between the first and second row of every section of my table view (see image) It seems that the reason for this line is that the first cell in each section is 1 pixel taller than the others. When I set the initial cell of each group to be 29 pixels high (the others are 30) the gap disappears and all is well. While this is workaround is successful, I'd rather know the reason for this occurring so I can avoid using a messy hack. FYI: I have made sure this is not an issue with the background images I have by using - they are all 30px high, and I have replaced the top image with a middle image with the same result. I have removed all borders between the cells by setting separatorStyle = UITableViewCellSeparatorStyleNone This effect doesn't happen on UITableViewStylePlain Any help is greatly appreciated. Thanks Code for table setup: myTable = [[UITableView alloc] initWithFrame:CGRectMake(TABLE_SHIFT_OFFSET, DATE_SLIDER_HEIGHT - DATE_SLIDER_SHADOW_HEIGHT, 326, self.view.frame.size.height - DATE_SLIDER_HEIGHT + DATE_SLIDER_SHADOW_HEIGHT) style:UITableViewStyleGrouped]; myTable.backgroundColor = [UIColor clearColor]; myTable.backgroundView = nil; myTable.separatorStyle = UITableViewCellSeparatorStyleNone; [self.view addSubview:myTable]; myTable.dataSource = self; myTable.delegate = self; Code for cell setup: - (float)tableView:(UITableView *)tableView
Tags (comma-separated)
Save Edits
Cancel