Beispiel #1
0
        private void Initialize()
        {
            _trackLayer = new RangeSliderTrackLayer();
            Layer.AddSublayer(_trackLayer);

            _leftKnobLayer = new RangeSliderKnobLayer();
            Layer.AddSublayer(_leftKnobLayer);
            SetLayerFrame();
        }
Beispiel #2
0
        public override bool BeginTracking(UITouch uitouch, UIEvent uievent)
        {
            var TouchPoint = uitouch.LocationInView(this);

            if (_leftKnobLayer.Frame.Contains(TouchPoint))
            {
                _leftKnobLayer             = TouchPoint;
                _leftKnobLayer.Highlighted = true;
                _leftKnobLayer.SetNeedsDisplay();
            }
            return(_leftKnobLayer.Highlighted);
        }
Beispiel #3
0
        public override bool ContinueTracking(UITouch uitouch, UIEvent uievent)
        {
            var TouchPoint = uitouch.LocationInView(this);

            if (_leftKnobLayer.Highlighted)
            {
                _leftKnobLayer = TouchPoint;
            }
            CATransaction.Begin();
            CATransaction.DisableActions = true;

            SetLayerFrame();
            CATransaction.Commit();
            return(_leftKnobLayer.Highlighted);
        }