Apple likes using method names like doThisWithPoint:
and doThisWithTouch:
for example and I thought—though I have such little XP that I'm probably wrong—that in Swift Apple wanted you to do signatures with doThis(withPoint : CGPoint)
and doThis(withTouch : UITouch)
and so you could overload the methods and when the bridge was created the Objective-C interface would look like doThisWithPoint
but now I'm getting an error saying that the selector doThis
already exists.
Any explanation as to what the best way to name and overload methods in Swift would be helpful. Not just what makes it run but what is the idiomatic way of doing it too. Thanks!