コード例 #1
0
        private void HandleTouchUpInsideWithStrongDelegate(object sender, EventArgs e)
        {
            InfColorPickerController picker = InfColorPickerController.ColorPickerViewController;

            picker.Delegate = selector;
            picker.PresentModallyOverViewController(this);
        }
コード例 #2
0
        private void HandleColorSelectorButtonTap(object sender, EventArgs e)
        {
            InfColorPickerController colorPicker = InfColorPickerController.ColorPickerViewController();

            colorPicker.Delegate = new ColorSelectedDelegate(this);
            colorPicker.PresentModallyOverViewController(this);
        }
コード例 #3
0
        private void HandleTouchUpInsideWithWeakDelegate(object sender, EventArgs e)
        {
            InfColorPickerController picker = InfColorPickerController.ColorPickerViewController();

            picker.WeakDelegate = this;
            picker.SourceColor  = this.View.BackgroundColor;
            picker.PresentModallyOverViewController(this);
        }
コード例 #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);
        }