Forum Xamarin Xamarin.iOS

How to change the Accessory BackgroundColor for my custom table cell?

PaulMolnarPaulMolnar USMember ✭✭

I'm a long-time C# guy, but I'm new to Xamarin (and mobile development, in general).

I have set the my TableView as transparent in my view controller:

myTableView.BackgroundView = null;
myTableView.BackgroundColor = UIColor.Clear;

and given my custom cell a semi-transparent view to allow a background image to show through:

ContentView.BackgroundColor = UIColor.FromWhiteAlpha(1f, 0.1f);

and it all works perfectly, except for the cell.accessories. Depending on the situation, I show a checkmark or a detail button in GetCell, but they render with the clear background of the table instead of the rest of the cell. I'm pretty sure I need to do something with AccessoryView in my custom cell class, but I haven't been able to figure it out or find a solution with my searches.

Any help would be appreciated, Thanks.

Sign In or Register to comment.