I have tested the code like you said and I am getting the following result in the console:
fightButton called
BattleViewController instantiated
navigationController nil
Why am I getting navigation controller as nil? I have clearly added it in my storyboard.
I am also getting this warning for the print statement for the navigation controller:
Expression implicitly coerced from 'UINavigationController?' to 'Any'
I have tested the code like you said and I am getting the following result in the console:
fightButton called
BattleViewController instantiated
navigationController nil
Why am I getting navigation controller as nil? I have clearly added it in my storyboard.
I am also getting this warning for the print statement for the navigation controller:
Expression implicitly coerced from 'UINavigationController?' to 'Any'