2013-06-30 26 views
0

我知道我可以關注this tutorial在iOS中開發非常自定義的分組表格,但它與原始UI有很大不同,我想實現的只是更改UITableViewCellSelectionStyleBlue和Gray以外的選定顏色(使用漸變)。是否可以在iOS中定製UITableViewCellSelectionStyleMyColor?

此外,如果手動設置單元格背景視圖顏色,則略有不同,選中時不顯示框架。

那麼,是否可以將UITableViewCellSelectionStyle的枚舉擴展爲UITableViewCellSelectionStyleOrange或Red或Pink?

謝謝你們。

回答

0

要改變這種情況,您需要在TableViewController中設置選定的單元格背景視圖。

self.selectedCellBackgroundView = [[UIView alloc] init]; 
[self.selectedCellBackgroundView setBackgroundColor:[UIColor orangeColor]]; 

iOS枚舉不可修改。

相關問題