Why isn't it possible to declare functions with same name in a UIViewController
but it is possible to declare functions with the same name in other classes
Why isn't it possible to declare functions with same name in a UIViewController
but it is possible to declare functions with the same name in other classes
The class that it works in is a Swift native class, which supports having function inputs that are differentiated only by their types (with same names).
The other class inherits from UIViewController
, which means it is bridged to Objective-C, which means it must be able to be called from Objective-C code. Objective-C does NOT allow this functionality, so that is why you have red arrows.