ios - How to Set InputView with ViewController -


self.view = [[[nsbundle mainbundle] loadnibnamed:@"keyboardview" owner:self options:nil] objectatindex:0]; self.inputview = (uiinputview*)self.view; 

above code setting nib file inputview, working, below code not working ...

newviewcontroller * myviewcontroller = [[uistoryboard storyboardwithname:@"keyboard"  bundle:nil] instantiateviewcontrollerwithidentifier:@"newview"]; self.view = myviewcontroller.view;  self.inputview = (uiinputview*)self.view; 

please check storyboard name. it's "keyboard" or different. have write bundle nil should [nsbundle mainbundle].

newviewcontroller * myviewcontroller = [[uistoryboard storyboardwithname:@"keyboard"  bundle:nil] instantiateviewcontrollerwithidentifier:@"newview"]; 

check this:

newviewcontroller *vc =[[uistoryboard storyboardwithname:@"mainstoryboard"                                bundle:[nsbundle mainbundle]] instantiateviewcontrollerwithidentifier:@"newview"]; 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -