0
我想定製我的UITableView中所有UITableViewCells的背景。到目前爲止,我還沒有能夠定製它們。如何在xamarin ios中自定義UITableViewCell的背景顏色?
到這裏看看:TableView
我想定製我的UITableView中所有UITableViewCells的背景。到目前爲止,我還沒有能夠定製它們。如何在xamarin ios中自定義UITableViewCell的背景顏色?
到這裏看看:TableView
在你GetCell方法,只是做:
public override UITableViewCell GetCell (UITableView tableView, NSIndexPath indexPath)
{
//Do cell stuff here
MyTestCell myCell = tableView.DequeueReusableCell("MyTestCell") as MyTestCell;
.......
.........
myCell.BackgroundColor = UIColor.Blue;
}
這樣一來,所有的UITableView細胞將有你將其設置爲顏色!
謝謝answer.i嘗試過,但沒有奏效。 –