Package cli.MonoTouch.Foundation

Examples of cli.MonoTouch.Foundation.NSNotificationCenter.AddObserver()


                }});

        NSNotificationCenter center = NSNotificationCenter.get_DefaultCenter();

        // observe UITextField
        center.AddObserver(UITextField.get_TextDidBeginEditingNotification(), didBegin);
        center.AddObserver(UITextField.get_TextFieldTextDidChangeNotification(), change);
        center.AddObserver(UITextField.get_TextDidEndEditingNotification(), didEnd);

        // observe UITextView
        center.AddObserver(UITextView.get_TextDidBeginEditingNotification(), didBegin);
View Full Code Here


        NSNotificationCenter center = NSNotificationCenter.get_DefaultCenter();

        // observe UITextField
        center.AddObserver(UITextField.get_TextDidBeginEditingNotification(), didBegin);
        center.AddObserver(UITextField.get_TextFieldTextDidChangeNotification(), change);
        center.AddObserver(UITextField.get_TextDidEndEditingNotification(), didEnd);

        // observe UITextView
        center.AddObserver(UITextView.get_TextDidBeginEditingNotification(), didBegin);
        center.AddObserver(UITextView.get_TextDidChangeNotification(), change);
View Full Code Here

        NSNotificationCenter center = NSNotificationCenter.get_DefaultCenter();

        // observe UITextField
        center.AddObserver(UITextField.get_TextDidBeginEditingNotification(), didBegin);
        center.AddObserver(UITextField.get_TextFieldTextDidChangeNotification(), change);
        center.AddObserver(UITextField.get_TextDidEndEditingNotification(), didEnd);

        // observe UITextView
        center.AddObserver(UITextView.get_TextDidBeginEditingNotification(), didBegin);
        center.AddObserver(UITextView.get_TextDidChangeNotification(), change);
        center.AddObserver(UITextView.get_TextDidEndEditingNotification(), didEnd);
View Full Code Here

        center.AddObserver(UITextField.get_TextDidBeginEditingNotification(), didBegin);
        center.AddObserver(UITextField.get_TextFieldTextDidChangeNotification(), change);
        center.AddObserver(UITextField.get_TextDidEndEditingNotification(), didEnd);

        // observe UITextView
        center.AddObserver(UITextView.get_TextDidBeginEditingNotification(), didBegin);
        center.AddObserver(UITextView.get_TextDidChangeNotification(), change);
        center.AddObserver(UITextView.get_TextDidEndEditingNotification(), didEnd);

        // slide the game view up when the keyboard is displayed
        center.AddObserver(UIKeyboard.get_DidShowNotification(),
View Full Code Here

        center.AddObserver(UITextField.get_TextFieldTextDidChangeNotification(), change);
        center.AddObserver(UITextField.get_TextDidEndEditingNotification(), didEnd);

        // observe UITextView
        center.AddObserver(UITextView.get_TextDidBeginEditingNotification(), didBegin);
        center.AddObserver(UITextView.get_TextDidChangeNotification(), change);
        center.AddObserver(UITextView.get_TextDidEndEditingNotification(), didEnd);

        // slide the game view up when the keyboard is displayed
        center.AddObserver(UIKeyboard.get_DidShowNotification(),
            new cli.System.Action$$00601_$$$_Lcli__MonoTouch__Foundation__NSNotification_$$$$_(new cli.System.Action$$00601_$$$_Lcli__MonoTouch__Foundation__NSNotification_$$$$_.Method() {
View Full Code Here

        center.AddObserver(UITextField.get_TextDidEndEditingNotification(), didEnd);

        // observe UITextView
        center.AddObserver(UITextView.get_TextDidBeginEditingNotification(), didBegin);
        center.AddObserver(UITextView.get_TextDidChangeNotification(), change);
        center.AddObserver(UITextView.get_TextDidEndEditingNotification(), didEnd);

        // slide the game view up when the keyboard is displayed
        center.AddObserver(UIKeyboard.get_DidShowNotification(),
            new cli.System.Action$$00601_$$$_Lcli__MonoTouch__Foundation__NSNotification_$$$$_(new cli.System.Action$$00601_$$$_Lcli__MonoTouch__Foundation__NSNotification_$$$$_.Method() {
                @Override public void Invoke (NSNotification nf) {
View Full Code Here

        center.AddObserver(UITextView.get_TextDidBeginEditingNotification(), didBegin);
        center.AddObserver(UITextView.get_TextDidChangeNotification(), change);
        center.AddObserver(UITextView.get_TextDidEndEditingNotification(), didEnd);

        // slide the game view up when the keyboard is displayed
        center.AddObserver(UIKeyboard.get_DidShowNotification(),
            new cli.System.Action$$00601_$$$_Lcli__MonoTouch__Foundation__NSNotification_$$$$_(new cli.System.Action$$00601_$$$_Lcli__MonoTouch__Foundation__NSNotification_$$$$_.Method() {
                @Override public void Invoke (NSNotification nf) {
                    if (_gameViewTransformed) {
                        // already transformed, bail with a warning
                        log.warning("Keyboard shown when already showing?", "viewTransform",
View Full Code Here

                    // touches outside of the keyboard will close the keyboard
                    _overlay.Add(_touchDetector);
                }}));

        center.AddObserver(UIKeyboard.get_WillHideNotification(),
            new cli.System.Action$$00601_$$$_Lcli__MonoTouch__Foundation__NSNotification_$$$$_(new cli.System.Action$$00601_$$$_Lcli__MonoTouch__Foundation__NSNotification_$$$$_.Method() {
                @Override public void Invoke (NSNotification nf) {
                    // bail if not transformed; this might be ok, if the keyboard was shown outside
                    // of our purview
                    if (!_gameViewTransformed) return;
View Full Code Here

                    _touchDetector.RemoveFromSuperview();
                    _platform._focus.update(null);
                }}));

        _currentOrientation = UIDevice.get_CurrentDevice().get_Orientation().Value;
        center.AddObserver(UIDevice.get_OrientationDidChangeNotification(),
            new cli.System.Action$$00601_$$$_Lcli__MonoTouch__Foundation__NSNotification_$$$$_(new cli.System.Action$$00601_$$$_Lcli__MonoTouch__Foundation__NSNotification_$$$$_.Method() {
                @Override
                public void Invoke (NSNotification nf) {
                    UIDeviceOrientation orient = UIDevice.get_CurrentDevice().get_Orientation();
                    if (orient.Value == _currentOrientation) return; // NOOP
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.