iphone - loading a nib file that is instantiated from a storyboard -


so pretty new story board concept. have view nibs dropped in storyboard , each corresponding uiviewcontroller subclass have, tried loading nib file using following code:

testviewcontroller *vc = [[testviewcontroller alloc] initwithnibname:@"testviewcontroller" bundle:nil];     [self.view setbackgroundcolor:[uicolor bluecolor]];     [self.view setframe:cgrectmake(0, self.profilepicture_.frameheight + self.profilepicture_.framey + 10, self.scrollview_.framewidth, 100)];     [self.view addsubview:vc.view]; 

however, gives me following error:

*** terminating app due uncaught exception 'nsinternalinconsistencyexception', reason: 'could not load nib in bundle: 'nsbundle </users/aditya15417/library/application support/iphone simulator/5.1/applications/64e6cec9-e6dc-4af5-bf16-11bfb6415bdc/pulse.app> (loaded)' name 'testviewcontroller'' 

so question is, if have nib in story board not possible use initwithnibname? if there way, how do this?

please use

[self.storyboard instantiateviewcontrollerwithidentifier:@"some identifier set in ib"]; 

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -