KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a UITableView with book titles. I also have a view (AddAndEditBookViewController) to enter info about the books. When I click "+" on the table's navigation bar I want to open my AddAndEditBookViewController. I know how to do it if I create the table in a separate nib file, but how do I do this if my view is created within the storyboard (without segues... more for learning purposes at this point). I read that I coud use the instantiateViewControllerWithIdentifier method from the storyboard, but how do I find the id of my view controller? I tried looking into the XML representation of the storyboard, but I don't seem to find it... Here's the code that tries to open the modal view. - (void)insertNewObject:(id)sender { AddAndEditBooksViewController * addViewController = (AddAndEditBooksViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@"gH8-2m-MXv"]; [addViewController setDelegate:self]; [addViewController setModalPresentationStyle:UIModalPresentationFormSheet]; [self presentViewController:addViewController animated:YES completion:NULL]; } My specific question is: What identifier should I use? where is it specified or how do I manually specify it? Thanks!
Tags (comma-separated)
Save Edits
Cancel