using InABox.Mobile; using InABox.Mobile.iOS; using UIKit; using Xamarin.Forms; using Xamarin.Forms.Platform.iOS; [assembly: ExportRenderer(typeof(MobileEditor), typeof(MobileEditorRenderer))] namespace InABox.Mobile.iOS { class MobileEditorRenderer : EditorRenderer { public MobileEditorRenderer() { UIKeyboard.Notifications.ObserveWillShow((sender, args) => { if (Element != null) { Element.Margin = new Thickness(0, 0, 0, args.FrameEnd.Height); //push the entry up to keyboard height when keyboard is activated } }); UIKeyboard.Notifications.ObserveWillHide((sender, args) => { if (Element != null) { Element.Margin = new Thickness(0); //set the margins to zero when keyboard is dismissed } }); } protected override void OnElementChanged(ElementChangedEventArgs e) { base.OnElementChanged(e); if (Control != null) { Control.Layer.CornerRadius = 5; Control.TextColor = UIColor.Black; } } } }