3
votes

I have a project which is already in App Store.

Now I need to add some more screens using storyboards to the project. The project was previously implemented using nib files.

I have created storyboard for the new view controller which I have added. When the view controller is called it comes up almost blank, none of the views which I have added for the controller are not showing up.

I have added below code how i'm loading the view controller from story board.

-(void)gotoEventsScreen
{
    EventsListViewController* eventsScreen = [[UIStoryboard storyboardWithName:@"EventsScreen" bundle:nil] instantiateInitialViewController];
    [self.navigationController pushViewController: eventsScreen animated:YES];
}

Note: I have made EventsListViewController as initialviewcontroller and it also has identifier.

I have also tried to load with identifier still it shows me the blank screen.

1
Have you linked the viewcontrollers correctly?Harikrishnan
@HarikrishnanT yes, in the inspector i have given the custom class name and also the IdentifierPrashanth
just to check if you have a navigation controller issue (like broken chain), try to present modally your storyboard vc, just for test.Calin Chitu
Have you given the storyboard ID? If not give a storyboard Id and then EventsListViewController* eventsScreen = [self.storyboard instantiateViewControllerWithIdentifier:@"EventsScreen"]; where "EventsScreen" is the storyboard IDHarikrishnan
If you are switching to storyboard, I would advice to use storyboard completely. Mixing up xib's and story board will cause a lot of complexities.Harikrishnan

1 Answers

1
votes

Actually there was some problem with my project base class view controller which consists the initWithCoder method which was not calling its super class method.