I try to get the coordinates from the location where I hit the touchscreen to do put a specific UIImage at this point.
How can I do this?
Swift 4.0
override func touchesBegan(_ touches: Set, with event: UIEvent?) { if let touch = touches.first { let position = touch.location(in: view) print(position) } }
source