Search code examples
iosiphoneobjective-cios5

StoryBoards navigating from View Controller to Tab view controller iOS 5


Im trying to create an application using story boards in iOS5. I want to move from a blank view which has an activity indicator to a tabbarcontroller which directs me to navigation and view controllers respectively. Ive got the tabbarcontroller - > navigation and view sorted however, i cant move from a view controller to a tabbarcontroller. I have an activity indicator which detects current location and once it does its supposed to move to tabbarcontroller but it doesn't.


Solution

  • Well it is hard to say what exactly is your issue however I would approach this from a different angle. Instead of worrying about the controller aspect one thing you could do is initialize your tabbarcontroller and then add its view over your current view controllers view. You would have to have the tabbarcontroller declared in your viewcontroller for simple implementation however this approach will work. Another thing you could always do is change the viewController to equal your tabbarcontroller in the app_delegate by making a call to a function that causes that assignment to happen. Maybe something like

    AppDelegate *delegate = [[UIApplication sharedApplication] delegate];
    [delegate moveToTabBarController];