A Tabbed application with a different Master Detail Table View on each tab, using Core Data

I was hoping someone could help a noobie out.

I am trying to create an iPhone/iPad app that uses tabs as its main navigation. The first tab will be kind of a home screen with basic info and a feedback button etc. The other tabs (3-4 tabs) each need to display a different "section" of the app. Each section will display a table view and navigation controller (using Core Data). These table views are unrelated to each other, each using different tables from the database (sqlite).

To illustrate this lets say tab 1 is the apps Home, tab 2 lists your grocery list, tab 3 lists recipes and tab 4 lists coupons available. They all fit together in the app but they come from completely different tables. Each navigation controller that appears on each tab is Completely different. Im using it like secondary navigation within the tab.

So my question is, does anyone have any tutorials that illustrates this technique? And if not do I have to create a different fetchedResultsController for each tab? I started the project using the Tabbed application template, I then created another dummy project using the master detail template and added the master detail code and xibs to my tabbed project. So I now have tabs that display the generic time stamp entity that comes with the master detail template however I cannot seem to get the tabs to display different data.

Also how can I create a navigation controller for each table view / tab? All of the documentation says to initialize it inside of the AppDelegate however if I put it there how can I get a different controller for each tab? Do I declare 3-4 controllers in the app delegate and some how assign them to each table view? I have not seen an example of this anywhere even though it makes sense. Tutorials would be much appreciated.

Thank you so much in advance. Im just stuck here. :(

-------------Problems Reply------------

So to start off each tab (I assume you're talking about a UITabBarController) will have it's own UINavigationController->UIViewController. I don't know of any tutorials about using the master-detail inside a tab and I haven't done it personally, but for your second question about navigation controllers inside your tab you would do the following:

Start off using a tab template using storyboard.

Inside your storyboard you can see that they have the two view controllers and they are tied in and stuff. I would just delete them as they aren't needed.

From the right side you'll drag in however many UINavigation controllers (the gold ones) you need. When you drag it in it should bring in two views, the controller and the root view.

From the tab bar controller control+drag to the navigation controller and connect it to Relation-view controllers. Do this for all the navigation controllers

Your storyboard should look somewhat like this:A Tabbed application with a different Master Detail Table View on each tab, using Core Data

You now have all view structure set up. So you'll now need to create all the classes for those. As you mentioned you'll create a recipe view controller, shopping list view controller...

Set the blank views to use the classes you just created created. From each of these classes you can push views to their navigation controller and it will push it onto that stack and if you switch tabs you'll start where that one left off.

Inside of each of these Classes there will need to be a NSfetchedResultsController that will tie into acore data database (Housed in the delegate or another class) and control that table.

Here is a great tutorial I've used for setting up my first nsfetchedresultscontroller. It goes through the entire process from start to finish.

http://www.raywenderlich.com/999/core-data-tutorial-how-to-use-nsfetchedresultscontroller

I hope that gets you off your stuck phase. let me know if there is anything unclear on the set up.

If anyones interested I found another tutorial that can help: http://iphonedevelopertips.com/user-interface/creating-a-tabbar.html#comment-64309

Also the Ray Wenderlich website listed in the above comment is a GREAT source for tutorials on many iPhone issues check it out!

Category:ios Views:0 Time:2011-12-08

Related post

  • Display records from Master/Master-Detail Table using SQL query only 2009-07-06

    I have a problem which I already solved using T-SQL(cursor & loop).(SQL server 2005) But I am looking for the solution using SQL. I have a Master Table with a column say MasterRecord(all are unique and type Varchar and PK) MasterRecord MRecord1 M

  • How can I put an editable table view in a tab bar application? 2010-11-05

    I am starting out with the tab bar application in XCode and I want to put a table view in one of the tabs. I know how to physically put the table view into a tab with interface builder, but I need to be able to edit the data in the table, so I'm not

  • Inner html for a Master detail table 2011-05-27

    I am trying to create a master detail table where one of the rows will contain the detail of a child object. For example we could have a customer and when you click on a row, it expands out to show the customer's orders. The html might look something

  • Creating a Java Bean from master Detail Table - Perfomance issue 2011-08-24

    I am creating a java bean from a master detail table. Lets call the master table A and Detail table B. When I make this in to a java bean I have BeanA and BeanB. BeanA will have all the relavant rows in the A table and will also have a list collectio

  • creating a simple Master Detail (Split View) app for iPad in Xcode 4.2 2011-12-01

    Can anyone help in creating a simple Master Detail (Split View) app for iPad in Xcode 4.2? I managed to get this done quite easily using previous version of xcode, but in xcode4.2, similar code is giving me the error Terminating app due to uncaught e

  • IOS - How can I add a tab bar to navigation controller (Master Detail template)? 2012-03-07

    I created my IOS 5 project using the "Master Detail" template in XCode4. This template give you a navigation controller. At some point I realized that I would like to add a tab bar to this application. So I'd like to keep the navigation controller bu

  • Adding a detail record in a master-detail window view 2010-01-07

    I'll preface with "Brand new to Cocoa" -- I have a master/detail page on my app: Students that may have one or several contacts (i.e. parents, relatives, etc). I have a Student entity and a Contact entity with a relationship field called "contact" in

  • SQL Select From Master - Detail Tables 2010-08-05

    I have two tables, named t_master and t_detail. The data in the t_detail table corresponds to a record on the master table. Data of t_master ID Brand 1 Toyota 2 Honda Data for the t_detail DetID ParentID Model 1 1 Corolla 2009 2 1 Corolla 2010 3 1 Co

  • Quick way to create a Master Detail Database viewer 2010-08-19

    I have a customer that wants to see some data. I can just sent it to him in an excel file, but the data is master/detail data and it would be nice to send it to him in a tree like form. Is there an really easy way to put data into some sort of free m

  • Handling master / detail tables in Forms (automatically appending data to detail table if unique) 2012-02-16

    I'm working on access and just finished my database scheme (access backend and frontend). Now I have a rather simple question, but I can't get my head around it. I have a few master tables and a lot of detail tables (1:n). For simplification I just u

  • How to display the master-detail tables into two xtragrid? 2012-03-07

    I have to tables:users and messages.And create the one-many relations between these tables.And,If I display this two table in single xtragrid, it's no problem,But ,I want to display into two grid,the detail of messages doesn't display. please help me

  • Implementing a Table View in a Tab Bar Controller? 2011-02-12

    I'm starting out with learning Table Views. My applications uses a Tab Bar Controller and all the tabs are simple views. I want to add another tab, and in this tab I'm trying to implement a Table style navigation controller. From what i'm reading the

  • No VIEW DETAILS when viewing the HISTORY tab 2013-07-18

    I'm using Vista x64. I want to see the details of the most recent MSE scan. Several Exploit:JAVA items keep showing up on the History tabe; Action Taken is REMOVED. I'd like to view the details of the scan, includinghow long it took . There is nothin

  • Master Detail same View binding controls 2010-06-03

    say I have a ListView with an ItemControl. And a Details part that shows the selected Item from the ListView. Both are in the same xaml page. I tried everything to accomplish it, but what do I miss? <!-- // List --> <ItemsControl ItemsSource

  • How can I delete rows in master, detail tables? 2011-11-29

    I have 4 tables that suppose: t1.id is PK and t2.id, t3.id, t4.id are FK, now, how can I delete a specific row (id) of all tables? Of course, I searched but I couldn't find my answer and am confused!!! Please help me. --------------Solutions---------

  • How to save settings in a tab control that has only one checked list view for two tab pages? 2011-02-25

    I have a tab control that has two tab pages. I am using a common list view for both the tab pages in which CheckedBoxes property is set true. There is a different list of checkboxes in listview for each tab page that populates whenever the respective

  • Detailed table view not working after changing main view 2011-07-06

    I'm new to programming and I have the following problem. I have a navigation based app that presents data from a SQLite data base in a table which can be drilled down to a detailed view. I have changed that main view of the app to present a login in

  • Login Screen+Table View in a Tab Controller= Nothing showing up after initial Login 2011-04-06

    This one's a little complicated~ Got a Login page that validates a username/password from an offsite server. The server returns a User ID which is then used in my app to find a matching plist file. If there isn't already one, it's supposed to create

  • Monotouch - Twitter/Path Application Master-Detail Swipe Table View 2012-01-14

    Any clue on how to create the twitter ipad application or path application swipe master-detail table view effect using MonoTouch? --------------Solutions------------- Our good friend Clancey has a C# port of what is called "FlyOutNavigation" on Githu

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.152 (s). 11 q(s)