예제 #1
0
        private void SetLayerFrame()
        {
            _trackLayer.Frame = new CGRect(0, (Bounds.Height * 0.25), Bounds.Width, Bounds.Height / 2);
            _trackLayer.SetNeedsDisplay();

            var leftX = _leftTouchPoint == CGPoint.Empty ? 50 : _leftTouchPoint.X;

            _leftKnobLayer.Frame = new CGRect(leftX, 0, Bounds.Height, Bounds.Height);
            _leftKnobLayer.SetNeedsDisplay();
        }
예제 #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);
        }