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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T03:15:26+00:00 2026-05-19T03:15:26+00:00

Objective-C/iPhone beginner here…looking for a shove in the right direction. I need to create

  • 0

Objective-C/iPhone beginner here…looking for a shove in the right direction.

I need to create an array that will later be stored using CoreData. In reality this is best described as an n x m matrix. Each row being a record. All data is integer.

something like this:

struct record
{
 int index;
 int mode;
 int counter;
};

struct record database[20];

I am paraphrasing here. This isn’t a database application. The matrix in question holds the data necessary to run a state machine. But, you get the idea. A bunch of rows of integers.

What’s the best O-C approach to this, considering that I need to save the matrix to the file system.

Can I use an NSArray of structs? (I don’t think NSArray likes non-object types).

NSArray of NSArray’s?

NSArray of NSDictionary?

Thank you,

-Martin

  • 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-19T03:15:26+00:00Added an answer on May 19, 2026 at 3:15 am

    You are correct. NSArray only accepts objects that inherit from NSObject. Because of this, you can use an array of NSArrays, or convert your struct to an object that inherits from NSObject and store that in the array instead. The bonus for this is that you (may?) be able to use an NSManagedObject which you could then integrate nicely with core data.

    Bear in mind that Core Data is an object graph, not a database. Because of this, you may want to start from that side, instead of designing your objects then trying to fit them into a relational database.

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

Sidebar

Related Questions

(programming in iPhone objective-C) I have a class level NSString* that I create, add
I'm looking for a oAuth/xAuth-Twitter-library for iPhone/Objective-C. I found MGTwitterEngine , but that didn't
I'm a beginner with Objective C and iPhone development. It's there any way to
Still learning Objective-C / iPhone SDK here. I think I know why this wasn't
Im trying to create a iPhone Objective C login page using PHP/MySQL to authenticate.
First off I am very new to Objective C and iPhone programming. Now that
I'm a beginner with iPhone dev in Objective C and one thing I find
How to create & access static string in iPhone (objective c)? I declare static
i am a beginner in objective c and iphone and i have undertaken a
Greetings! as a beginner in iPhone application development using Objective-C, I was wondering what

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.