Let's say I have a class
public class MyClass: NSObject, ABCDelegate {
func delegateMethod(a: a, b: b) {
...
}
}
This delegate method is being called by a singleton in MyClass
that handles some networking operations.
The thing is the compiler complains about Method 'delegateMethod(...)' must be declared public because it matches a requirement in public protocol 'ABCDelegate'
.
My question is:
- Why exactly is the compiler complaining for the method being declared as
private func
or simplyfunc
- How can I declare the ABCDelegate methods to be private to this class?