Ejemplo n.º 1
0
        protected void SetupDragAndDrop()
        {
            NumberLabel.UserInteractionEnabled      = true;
            EvenNumbersLabel.UserInteractionEnabled = true;
            OddNumbersLabel.UserInteractionEnabled  = true;

            var numberDragInteraction = new UIDragInteraction(this);

            NumberLabel.AddInteraction(numberDragInteraction);

            // On iPad, this defaults to true. On iPhone, this defaults to
            // false. Since this app should work on the iPhone, enable the the
            // drag interaction.
            numberDragInteraction.Enabled = true;

            evenDropInteraction = new UIDropInteraction(this);
            EvenNumbersLabel.AddInteraction(evenDropInteraction);
            oddDropInteraction = new UIDropInteraction(this);
            OddNumbersLabel.AddInteraction(oddDropInteraction);
        }
        void ReleaseDesignerOutlets()
        {
            if (EvenNumbersLabel != null)
            {
                EvenNumbersLabel.Dispose();
                EvenNumbersLabel = null;
            }

            if (NumberLabel != null)
            {
                NumberLabel.Dispose();
                NumberLabel = null;
            }

            if (OddNumbersLabel != null)
            {
                OddNumbersLabel.Dispose();
                OddNumbersLabel = null;
            }
        }