Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8648753
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T13:23:14+00:00 2026-06-12T13:23:14+00:00

Okay so i have done a tutorial that has me populating a TableViewController from

  • 0

Okay so i have done a tutorial that has me populating a TableViewController from the appDelegate.m file in this way.

UINavigationController *navController = (UINavigationController *) self.window.rootViewController;
MasterViewController *masterController = [navController.viewControllers objectAtIndex:0];
masterController.bugs = bugs;

I am attempting my own small app for some practice but the way i’m doing it my TableViewController is not the rootViewController. It is the next view after that. I am using storyboards to create my GUI, not sure if that is a needed to know thing.

Basically I have my object that has an member that is and array and I want to create the object in the appDelegate file and populate the TableViewController with the array from my object.

Here is some extra details:

I did was was suggested and replaced the 0 index with a 1 but i get this exception error

2012-10-07 21:34:23.785 EasyBudget[5257:f803] * Terminating app due to uncaught exception ‘NSRangeException’, reason: ‘* -[__NSArrayI objectAtIndex:]: index 1 beyond bounds [0 .. 0]’
* First throw call stack:
(0x14b5022 0xeb5cd6 0x14a1644 0x20c8 0x16386 0x17274 0x26183 0x26c38 0x1a634 0x139fef5 0x1489195 0x13edff2 0x13ec8da 0x13ebd84 0x13ebc9b 0x16c65 0x18626 0x1efd 0x1e65 0x1)
terminate called throwing an exception

I understand the reason for the exception. For some reason my the Array that holds the different views from my navigation controller only has a 0 index. I’m just not sure how to fix this. I set my storyboard up in the way Navigation Controller -> ViewController (which is my root view relationship) -> Table View Controller (this is the view i’m trying to access). I added a bar button item with a push segue from my root view controller to the table view controller. When i built and ran before adding code everything worked I could push my button and it went from my view controller to my table view controller and i was able to push the back button the was automagically made by the navigation bar to get back to my view controller. I hope this was all done correctly. Any more help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T13:23:15+00:00Added an answer on June 12, 2026 at 1:23 pm

    Okay so i have done a tutorial that has me populating a
    TableViewController from the appDelegate.m file in this way.

    That makes sense for the “tutorial” because the table view controller is the nav controller’s root view controller, so it’s always going to be available. I’m guessing that tapping a row in the table probably causes the app to transition to a detail view controller related to the tapped row, and that detail view controller is probably set up by the table view controller.

    You can follow the same pattern in your app: have your app delegate do whatever’s necessary to set up the navigation controller’s root view controller, and then have that controller set up whatever view controller it transitions to. Since you’re using storyboards, a good place to do that is in your view controller’s -prepareForSegue:sender: method — you can get the segue’s destination view controller in that method and pass over whatever data is necessary for the new controller (i.e. your table view controller) to do it’s thing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay i've seen this done somewhere before where you have a function that takes
Okay, I have done a bit of searching online and found this thread, but
Okay I have 2 files. One file is data that is updated every 10
Okay, what have I done wrong here? I'm trying to .POST data from a
Hye guys. Okay. I have done this coding. But it seems have error. Can
Okay. I'm sick of this problem. This has to have an easy fix, I'm
I am trying to password protect an asp.net site, i have done this okay,
okay i have been trying to understand this for hours i am learning VB
Okay I have a large CRUD app that uses tabs with Forms embedded in
okay i have found the way to run a video in a image.... the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.