我想自定义 UITableView 中所有 UITableViewCells 的背景。到目前为止,我无法自定义它们。
看看这里: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 单元格都将具有您设置的颜色!
关于ios - 如何在 xamarin ios 中自定义 UITableViewCell 的背景颜色?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42297628/