using Billing.iOS.Renderers;
using Billing.UI;
using UIKit;
using Xamarin.Forms;
using Xamarin.Forms.Platform.iOS;

[assembly: ExportRenderer(typeof(OptionDatePicker), typeof(OptionDatePickerRenderer))]
namespace Billing.iOS.Renderers
{
    public class OptionDatePickerRenderer : DatePickerRenderer
    {
        protected override void OnElementChanged(ElementChangedEventArgs<DatePicker> e)
        {
            base.OnElementChanged(e);

            var control = Control;
            if (e.NewElement != null && control != null)
            {
                control.BorderStyle = UITextBorderStyle.None;
                control.TextAlignment = UITextAlignment.Center;
            }
        }
    }
}