mirror of
https://github.com/bitwarden/android.git
synced 2024-11-01 07:35:52 +03:00
25 lines
727 B
C#
25 lines
727 B
C#
using Bit.App.Controls;
|
|
using Bit.iOS.Controls;
|
|
using UIKit;
|
|
using Xamarin.Forms;
|
|
using Xamarin.Forms.Platform.iOS;
|
|
|
|
[assembly: ExportRenderer(typeof(ExtendedSwitchCell), typeof(ExtendedSwitchCellRenderer))]
|
|
namespace Bit.iOS.Controls
|
|
{
|
|
public class ExtendedSwitchCellRenderer : SwitchCellRenderer
|
|
{
|
|
public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv)
|
|
{
|
|
var extendedCell = (ExtendedSwitchCell)item;
|
|
var cell = base.GetCell(item, reusableCell, tv);
|
|
|
|
if(cell != null)
|
|
{
|
|
cell.BackgroundColor = extendedCell.BackgroundColor.ToUIColor();
|
|
}
|
|
|
|
return cell;
|
|
}
|
|
}
|
|
}
|