More Gesture Recognizers
In this section, you are going to add the ability for a user to select a line by pressing and holding (a long press) and then move the selected line by dragging the finger (a pan). This will require two more subclasses of UIGestureRecognizer: UILongPressGestureRecognizer and UIPanGestureRecognizer.
In DrawView.swift, instantiate a UILongPressGestureRecognizer in init?(coder:) and add it to the DrawView.
... addGestureRecognizer(tapRecognizer) let longPressRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(DrawView.longPress(_:))) addGestureRecognizer(longPressRecognizer) }
Now when the user holds down on the DrawView, the method longPress(_:) ...