Пример #1
0
 public static void UpdateTextFieldText(this ICCCTextFieldDelegateProxy This, global::UIKit.UITextField textField)
 {
     if (textField == null)
     {
         throw new ArgumentNullException("textField");
     }
     global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr(This.Handle, Selector.GetHandle("updateTextFieldText:"), textField.Handle);
 }
Пример #2
0
 public static void SetTextField(this ICCCTextFieldDelegateProxy This, global::UIKit.UITextField value)
 {
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr(This.Handle, Selector.GetHandle("setTextField:"), value.Handle);
 }
Пример #3
0
        public void TargetedNotificationsTest()
        {
            bool called = false;

            using (var txt = new global::UIKit.UITextField())
                using (var notification = global::UIKit.UITextField.Notifications.ObserveTextFieldTextDidChange(txt, (sender, e) => called = true)) {
                    NSNotificationCenter.DefaultCenter.PostNotificationName(global::UIKit.UITextField.TextFieldTextDidChangeNotification, null);
                    Assert.False(called, "Notification should not be called");

                    NSNotificationCenter.DefaultCenter.PostNotificationName(global::UIKit.UITextField.TextFieldTextDidChangeNotification, txt);
                    Assert.True(called, "Notification should have been called");
                }
        }
Пример #4
0
 public virtual void UpdateTextFieldText(global::UIKit.UITextField textField)
 {
     if (textField == null)
     {
         throw new ArgumentNullException("textField");
     }
     if (IsDirectBinding)
     {
         global::ApiDefinition.Messaging.void_objc_msgSend_IntPtr(this.Handle, Selector.GetHandle("updateTextFieldText:"), textField.Handle);
     }
     else
     {
         global::ApiDefinition.Messaging.void_objc_msgSendSuper_IntPtr(this.SuperHandle, Selector.GetHandle("updateTextFieldText:"), textField.Handle);
     }
 }