I've just started learning Swift, and I've been trying to move a UIView in response to a touch. I'm getting an exc_bad_instruction
error.
var location = CGPoint(x: 0, y:0)
@IBOutlet weak var person: UIView!
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
let touch : UITouch! = touches.first
location = touch.location(in: self.view)
person.center = location
}