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:
25
src/iOS/Controls/ExtendedSwitchCellRenderer.cs
Normal file
25
src/iOS/Controls/ExtendedSwitchCellRenderer.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user