I had a problem when I ran my application in landscape mode. I fixed it with this one line : let position = touch.locationInView(self.superview?.superview). It was just let position = touch.locationInView(self.superview) before. Why does this fix work?