Closed ohdair closed 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)
}