ohdair / GesturableGraph

1 stars 0 forks source link

Gesture 구현 #5

Closed ohdair closed 1 year ago

ohdair commented 1 year ago
ohdair commented 1 year ago
LineView의 위치 before after
// before
public override func touchesBegan(
    _ touches: Set<UITouch>,
    with event: UIEvent?)
{
  movingLine.frame.origin.x = touchedPoint.x
}

// after
public override func touchesBegan(
    _ touches: Set<UITouch>,
    with event: UIEvent?)
{
  movingLine.center = CGPoint(x: touchedPoint.x, y: movingLine.center.y)
}