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
Post a Comment