示例#1
0
 protected override void Dispose(bool disposing)
 {
     if (_textField != null)
     {
         _textField.KeyPressed -= TextField_KeyPressed;
         _textField             = null;
     }
     base.Dispose(disposing);
 }
示例#2
0
 protected override UITextField CreateNativeControl()
 {
     // https://github.com/xamarin/Xamarin.Forms/blob/master/Xamarin.Forms.Platform.iOS/Renderers/EntryRenderer.cs
     _textField = new KeyPressUITextField(RectangleF.Empty)
     {
         BorderStyle   = UITextBorderStyle.RoundedRect,
         ClipsToBounds = true
     };
     _textField.KeyPressed += TextField_KeyPressed;
     return(_textField);
 }