ios - Application tried to push a nil view controller on target -


i got below error:

application tried push nil view controller on target uinavigationcontroller: 0x7b98940.

it caused when 'click' cell of uitableviewcontroller. code:

#pragma mark - table view delegate  - (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath {     verifyinfoviewcontroller *verifyinfovc = [self.storyboard instantiateviewcontrollerwithidentifier:@"verifyinfovc"];     [self.navigationcontroller pushviewcontroller:verifyinfovc animated:yes]; } 

this error means viewcontroller has not been allocated properly, , guess self.storyboard nil, if yes means didn't initialise master viewcontroller , can below trick:

uistoryboard *storyboard = [uistoryboard storyboardwithname:@"mainstoryboard" bundle:[nsbundle mainbundle]]; 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -