Пример #1
0
                public override void AddToView(object obj)
                {
                    Anchor.AddAsSubview(obj);
                    TextView.AddAsSubview(obj);
                    NoteIcon.AddAsSubview(obj);
                    UtilityLayer.AddAsSubview(obj);
                    DeleteButton.AddAsSubview(obj);
                    CloseButton.AddAsSubview(obj);

                    TryAddDebugLayer(obj);
                }
Пример #2
0
            public override void AddAsSubview(object masterView)
            {
                // we know that masterView will be an iOS View.
                UIView view = masterView as UIView;

                if (view == null)
                {
                    throw new Exception("Object passed to iOS AddAsSubview must be a UIView.");
                }

                TextView.AddAsSubview(view);

                // add the handler when we're in a hierarchy
                ObserverHandle = NSNotificationCenter.DefaultCenter.AddObserver(UITextView.TextDidChangeNotification, OnTextChanged);
            }