2016-05-18 03:28:19 +02:00
|
|
|
|
using Bit.App.Controls;
|
|
|
|
|
using Bit.iOS.Controls;
|
|
|
|
|
using UIKit;
|
|
|
|
|
using Xamarin.Forms;
|
|
|
|
|
using Xamarin.Forms.Platform.iOS;
|
|
|
|
|
|
|
|
|
|
[assembly: ExportRenderer(typeof(ExtendedViewCell), typeof(ExtendedViewCellRenderer))]
|
|
|
|
|
namespace Bit.iOS.Controls
|
|
|
|
|
{
|
|
|
|
|
public class ExtendedViewCellRenderer : ViewCellRenderer
|
|
|
|
|
{
|
|
|
|
|
public override UITableViewCell GetCell(Cell item, UITableViewCell reusableCell, UITableView tv)
|
|
|
|
|
{
|
|
|
|
|
var extendedCell = (ExtendedViewCell)item;
|
|
|
|
|
var cell = base.GetCell(item, reusableCell, tv);
|
|
|
|
|
|
|
|
|
|
if(cell != null)
|
|
|
|
|
{
|
|
|
|
|
cell.BackgroundColor = extendedCell.BackgroundColor.ToUIColor();
|
2016-07-01 06:03:54 +02:00
|
|
|
|
if(extendedCell.ShowDisclousure)
|
|
|
|
|
{
|
|
|
|
|
cell.Accessory = UITableViewCellAccessory.DisclosureIndicator;
|
|
|
|
|
}
|
2016-05-18 03:28:19 +02:00
|
|
|
|
}
|
|
|
|
|
|
2016-08-02 03:47:42 +02:00
|
|
|
|
WireUpForceUpdateSizeRequested(item, cell, tv);
|
|
|
|
|
|
2016-05-18 03:28:19 +02:00
|
|
|
|
return cell;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|