Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 07-27-2011, 01:07 PM   #1 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 54
Nekbeth is on a distinguished road
Default Help with Multiple FetchResultsControllers (Core Data)

Hi, I added navigation based category tableview, after I select the cell it takes you to another Controller who has specific entity descriptions and predicates on it's FetchResultController, the results is working fine, but only for the description of the fetchresult.. (which in this case is by a attribute that contains a strings).

What I want to do next is to select a different cell (with a different strings obviously) and give me a similar result to the one above. My way to do this (may not be the best).. is to:

1- Make another viewcontroller with it's tableview
2- Create another FetchresultsController inside it (with it's particular description on the predicate)
3 - Just push that controller when the cell is selected.



Is this the right way ? create a new viewController for each FetchResultsController? or can I create FetchresultsController instances in 1 viewController only .. I don't think I can.. but I wanted to be sure. If there is another way to get this results, I'll appreciate your ideas.

Again, what I want is to select a category I choosed before from an entity. A tableview appears with only the categories of that entities, when you select a category .. it should give you the "names" attribute of those entities.
So I have that working ok, if I select only 1 category (for instance Chocolate and it pushes me to all chocolate cakes). I want to do the same thing with Cheese, so it gives me all the Cheese cakes. This could mean making a lot of viewControllers (for each FetchResultsController). So that is my doubt.

Thanks
__________________
My Apps: Pastry Chef
(try the free version)

Nekbeth is offline   Reply With Quote
Old 07-28-2011, 12:10 PM   #2 (permalink)
Senior Member
iPhone Dev SDK Supporter
 
Join Date: Jan 2010
Location: Issaquah, WA
Age: 42
Posts: 1,244
dljeffery is on a distinguished road
Default

The normal way, assuming that your data is all structured similarly (and it sounds like yours is), is to always push the same secondary view controller from your table view controller. Just pass in the data needed to initialize the secondary view controller properly.

Especially in the case you describe, if in view 1 you tap on "Chocolate", you just push a second view with a list of all the chocolate cakes, right? And if you tap on "Cheese" instead, you push a second view with a list of all the cheesecakes? And then, I assume, from the secondary view, if you type on a name of a specific cake, you push a third view that shows the recipe, perhaps a photo, etc. If so, you definitely don't want custom views for each type. And if you did have custom views for each type, that would mean that you can't dynamically define new types at runtime.

Perhaps I'm not reading your description clearly, though.
__________________
Recall It! Tag your notes. Tag your photos. Tag your thoughts. Tag your life.

Recall It! for iPad

http://www.dljeffery.com
dljeffery is offline   Reply With Quote
Reply

Bookmarks

Tags
core data

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 405
14 members and 391 guests
7twenty7, blasterbr, buggen, chiataytuday, dre, fiftysixty, HemiMG, jimmyon122, jonathandeknudt, LEARN2MAKE, nyoe, pungs, tymex, UMAD
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,668
Threads: 94,121
Posts: 402,902
Top Poster: BrianSlick (7,990)
Welcome to our newest member, jonathandeknudt
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:01 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0