mirror of
https://github.com/bitwarden/android.git
synced 2024-11-01 07:35:52 +03:00
40 lines
1 KiB
C#
40 lines
1 KiB
C#
|
using System;
|
|||
|
using System.ComponentModel;
|
|||
|
using Bit.App.Controls;
|
|||
|
using Bit.iOS.Controls;
|
|||
|
using UIKit;
|
|||
|
using Xamarin.Forms;
|
|||
|
using Xamarin.Forms.Platform.iOS;
|
|||
|
|
|||
|
[assembly: ExportRenderer(typeof(ExtendedTableView), typeof(ExtendedTableViewRenderer))]
|
|||
|
namespace Bit.iOS.Controls
|
|||
|
{
|
|||
|
public class ExtendedTableViewRenderer : TableViewRenderer
|
|||
|
{
|
|||
|
protected override void OnElementChanged(ElementChangedEventArgs<TableView> e)
|
|||
|
{
|
|||
|
base.OnElementChanged(e);
|
|||
|
|
|||
|
var view = e.NewElement as ExtendedTableView;
|
|||
|
if(view != null)
|
|||
|
{
|
|||
|
CorrectMargins(view);
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
protected override void OnElementPropertyChanged(object sender, PropertyChangedEventArgs e)
|
|||
|
{
|
|||
|
base.OnElementPropertyChanged(sender, e);
|
|||
|
|
|||
|
var view = (ExtendedTableView)Element;
|
|||
|
|
|||
|
CorrectMargins(view);
|
|||
|
}
|
|||
|
|
|||
|
private void CorrectMargins(ExtendedTableView view)
|
|||
|
{
|
|||
|
Control.ContentInset = new UIEdgeInsets(-10, 0, -100, 0);
|
|||
|
}
|
|||
|
}
|
|||
|
}
|