2011-06-29 47 views
0

我要複製的細節部分的Gowalla的用戶界面(有圖&路線表)下面的圖片 enter image description here如何在空UITableViewCell中設置顏色?

我用一個contentInset表設置backgroundColor到clearColor複製它,並改變的UITableViewCell的顏色- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath白色,但結果 是不是我所期待的空白單元格是白色的只是細胞含量(- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section一些回報)這是一個結果我得到了

enter image description here

有沒有什麼辦法可以設置空單元格顏色或任何指導如何實現這一目標?

回答

0

由於長時間沒有反應,我會在這裏發佈我的解決方案。我通過UITableView在UIView下設置父視圖的背景顏色和UITableViewCell顏色一樣解決了這個問題。

0

設置與您爲單元格設置相同的背景顏色。並使細胞透明。

+0

如果我將UITableView backgroundColor設置爲白色,表格後面的內容(在Gowalla情況下,人數和簽入)將是不可見的。 – sarunw