I want to replicate Gow开发者_开发知识库alla UI of the detail part (the table with Map & Directions) picture below
I replicate it with a table with a contentInset, set backgroundColor to clearColor, and change color of UITableViewCell in - (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath
to white, but the result
isn't what I expected the empty cells are white only the cells with content (a number return by - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
) here is a result I got
Is there any way to set empty cell color or any guide on how to achieve this ?
Set background color of view same as you are setting for your cell. and make cell transparent.
Due to no response for long time I would posted my solution here. I solved this problem by having UITableView under UIView and set parent view background color the same as UITableViewCell color.
精彩评论