1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-08 03:23:23 +00:00

positioning. extended switch cell.

This commit is contained in:
Kyle Spearrin
2016-05-18 23:55:30 -04:00
parent 383a49b75c
commit 54652e639b
10 changed files with 103 additions and 15 deletions

View File

@@ -0,0 +1,25 @@
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;
}
}
}