Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Okay, here goes: This <em>is</em> the correct answer to the question, however, it did not end up being this hard. All I had to do was the following:</p> <p>Create a property in ResortViewController of type int with variable name whichChoice (for instance). Then address it in the setup of the TabBarController a la:</p> <pre><code>// setup the first view controller just like the first ResortsListViewController *resortsListViewController; resortsListViewController = [[ResortsListViewController alloc] initWithNibName:@"ResortsListView" bundle:nil]; // START HERE IS THE CHANGE resortsListViewController.whichChoice = 1; // END HERE IS THE CHANGE resortsListViewController.title = @"Category1"; resortsListViewController.tabBarItem.image = [UIImage imageNamed:@"image1.png"]; resortsListViewController.navigationItem.title=@"Category1"; localNavigationController = [[UINavigationController alloc] initWithRootViewController:resortsListViewController]; [localControllersArray addObject:localNavigationController]; [localNavigationController release]; </code></pre> <p>To find out which tab was clicked when my resortsListViewController takes over, I simply query the class variable: whichChoice to get the answer.</p> <p>Things like this are so simple you skip over them. I thought you had to pass the variable in an <em>action</em> and specify where it would go with the <em>target</em> like you do in other objects -- but when you set things up ahead of time you do not have to do that. Now, having said that, dynamically setting "whichChoice" is not so easy without a lot more thought...but setting it to a variable KNOWN at setup is fine.</p> <p>For answer #2, I simply put a variable style of IBOutlet in my class, hooked it up to the table, and then followed your instructions, because without the variable in the IBOutlet and hooking it up to the table, there is no reference to the table view. For some reason hooking up the table simply to the VIEW "Referencing Outlet" and calling <code>[self.tableview reloadData]</code> did not do the job.</p> <p>But for the most part, your answers were right and led me in the right direction. As an aside, I really hate that you have to right-click and drag from here-to-there in IB if you have an IB element you built. You should be able to hook it up in code using it's ObjectId (or something). That would be more in line with programmers. I know IB is made to allow <em>programming</em> to be easier for <em>designers</em>, but <em>gee wilikers</em>..it is hard to wrap my mind around! I end up dropping IB and creating elements in code most of time time...which I do not know if is as fast to execute. I tend to think not...but have no proof to the contrary.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload