In my function
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?){
for touch in touches{
let touchLocation = touch.location(in: self.view)
print("X: \(touchLocation.x) Y: \(touchLocation.y)")
}
}
I get reversed Y value. If I click at the top I get ~0 value and if I click at the bottom I get high value. This makes my sprite im moving move in the wrong Y direction.
However if I remove '.view' in self.view it works as it should. Does anyone know why it's reversed when I use self.view?