Ok, so I found out what was wrong; an issue impossible to detect without access to the code, so in retrospect I should have posted both the parent class
and container
class
. Sorry about that.
Anyway the issue was that the container
viewController
inherited from the parent
viewController
. This enabled me to share code in the two container
viewControllers
.
So the structure was basically this:
class WizardChooseArmViewController: WizardViewController {
...
This is the parent
viewController
which inherits from a base viewController
. Then the container
viewControllers
looked like this:
final class WizardTwoArmsViewController: WizardChooseArmViewController {
...
Apparently it's a bad idea for containers
to inherit from its parent
, so I refactored and changed it to:
final class WizardTwoArmsViewController: WizardViewController {
...
Not quite sure why its not possible for containers
to inherit
from its parent
. Would be great if someone could brief me.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…