2010-12-16 35 views
1

我有一個的tableView內導航控制器cell.accessoryType中的tableView的cellForRowAtIndexPath不workinkg ...方法

我想改變的背景和我的控制器使用

[[self view] setBackgroundColor:SomeColor]; 

-awakeFromNib方法類

如果「SomeColor」是黑色的我看不到cell.accessoryType (UITableViewCellAccessoryDisclosureIndicator)

有沒有辦法讓它變成白色?

我嘗試在- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath metod中設置cell.accessoryType = UITableViewCellAccessoryDetailDisclosureButton;但沒有任何反應,我錯過了什麼嗎?

+1

也許提供更多的代碼。改變顏色不應該影響電池配件。 – WrightsCS 2010-12-16 00:38:44

+1

'tableView:cellForRowAtIndexPath:'是設置單元格的適當位置,並且由於公開箭頭是灰色的,即使單元格的背景爲黑色,它也應該可見。此外,請注意披露按鈕是**按鈕**,而不僅僅是另一種類型的箭頭。這是爲了直接點擊時產生不同的動作,而不是一般點擊單元格。 – Brian 2010-12-17 19:01:44

回答

2

嘗試在- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath { 中做到這一點,如果表格視圖是平面的。

+0

非常感謝!有效! – MandarX 2010-12-17 18:53:36

相關問題