1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-12-20 15:57:45 +01:00
bitwarden-mobile/src/iOS/Controls/ExtendedSwitchCellRenderer.cs
2016-05-18 23:55:30 -04:00

26 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;
}
}
}