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 3987170
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T06:06:08+00:00 2026-05-20T06:06:08+00:00

I have a coreData model where I have an Event table and video, text,

  • 0

I have a coreData model where I have an Event table and video, text, audio, image tables that have a many to one relationship with the event table.

In my app I have a rootTableViewController class that displays all the events. selecting an Event cell brings up a detailTableViewController that would display all the associated text, video, audio and image objects in the UItable. Objects should be sorted chronologically so there might be a mix of all the different object types in the table.

my question is: Is this possible to do this with a UItableView?
Is it better to fetch all the objects in a NSMutableArray, then sort the array and use it as an input for CellForRowAtIndexPath.

I was able to do this with a UIScrollView (without coredata). Inserting different views based on the object type; but i thought using a UITableView is better suited for data management.

Thanks a bunch for any help provided.

  • 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-05-20T06:06:08+00:00Added an answer on May 20, 2026 at 6:06 am

    You generally only want to bother with fetches when you don’t know which managed objects you are looking for. If you have a managed object but need other related objects, you just walk the relationship graph instead of fetching.

    In this case the rootTableViewController had the Event object selected by the user. When it loads the detailTVC, it can pass it the Event object. The detailTVC can then ask the Event object for all its associated media objects. You can then sort them into an array anyway you wish.

    To display each media type, create a custom tableview cell for each type and load that cell when the index points a managed object of that type.

    An additional word of advice. This is wrong when you say:

    I have a coreData model where I have a
    Event table and video, text, audio,
    image tables that have a many to one
    relationship with the event table.

    Core Data is not SQL. It does not have tables, rows, columns etc. Instead it has entities (abstract) and managed objects (concrete). Relationships connect entities in the model and managed objects in the actual live data. This is called an object graph and the main point of Core Data is to managed that graph. Unlike SQL, it really doesn’t care how or even if the graph is ever persisted to disk.

    Thinking of Core Data in terms of SQL always leads to grief.

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

Sidebar

Related Questions

I have a to-many relationship in my CoreData model without an inverse relationship which
I have a sqlite DB created by my CoreData model automatically, but my app
My CoreData model have 3 entities with to-many relationships: job <<-->> group <<-->> person
I have a simple Coredata model with one entity called conversation and the other
I have a core data model which includes an entity with a to-many relationship.
I am struggling with designing a coreData model where I have only one type
I have a Department entity which has a one-to-many relationship to an Employee entity.
When I have a CoreData entity named, say, 'Book', which has a one-to-one relationship
I have an old Xcode project which contains a CoreData model (containing a version
I have several Core Data model version that I have added to my .xcdatamodeld

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.