mirror of
https://github.com/bitwarden/mobile
synced 2025-12-20 18:23:51 +00:00
ExtendedTextCell and ExtendedViewCell for iOS and Android. BackgroundColor and Disclousure Indicators
This commit is contained in:
25
src/iOS/Controls/ExtendedViewCellRenderer.cs
Normal file
25
src/iOS/Controls/ExtendedViewCellRenderer.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(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();
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user