private void HandleTouchUpInsideWithStrongDelegate(object sender, EventArgs e)
        {
            InfColorPickerController picker = InfColorPickerController.ColorPickerViewController;

            picker.Delegate = selector;
            picker.PresentModallyOverViewController(this);
        }
        private void HandleColorSelectorButtonTap(object sender, EventArgs e)
        {
            InfColorPickerController colorPicker = InfColorPickerController.ColorPickerViewController();

            colorPicker.Delegate = new ColorSelectedDelegate(this);
            colorPicker.PresentModallyOverViewController(this);
        }
        private void HandleTouchUpInsideWithWeakDelegate(object sender, EventArgs e)
        {
            InfColorPickerController picker = InfColorPickerController.ColorPickerViewController();

            picker.WeakDelegate = this;
            picker.SourceColor  = this.View.BackgroundColor;
            picker.PresentModallyOverViewController(this);
        }
Ejemplo n.º 4
0
        public void Show()
        {
            UIWindow window = UIApplication.SharedApplication.KeyWindow;

            if (window == null)
            {
                throw new InvalidOperationException("There's no current active window");
            }

            var viewController = window.RootViewController;

            ColorSelectedDelegate selector = new ColorSelectedDelegate(viewController);

            InfColorPickerController picker = InfColorPickerController.ColorPickerViewController;

            picker.Delegate = selector;
            picker.PresentModallyOverViewController(viewController);
        }