Short answer:
To be able to subclass it, the base class WDBaseViewController
needs to be defined as open
instead of public
in the framework you are using.
open class WDBaseViewController {
...
}
If it’s an internal framework you can do it yourself, otherwise you will have to wait for the author to support Swift 3.
Long answer:
Swift 3 is bringing significant changes to access control.
Swift 2 only had 3 access levels:
private
: entities are available only from within the source file where they are defined.
internal
: entities are available to the entire module that includes the definition.
public
: entities are intended for use as API, and can be accessed by any file that imports the module.
Swift 3 is adding 2 more access levels (open
and fileprivate
) and changing the meaning of private
:
private
: symbol visible within the current declaration only.
fileprivate
: symbol visible within the current file.
internal
: symbol visible within the current module.
public
: symbol visible outside the current module.
open
: for class or function to be subclassed or overridden outside the current module.