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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T14:07:43+00:00 2026-06-09T14:07:43+00:00

I have an NSDictionary that I am passing to a NSObject Class where I

  • 0

I have an NSDictionary that I am passing to a NSObject Class where I pull all of the values out of the dictionary and pass them into their correct types.

For instance NSInteger, BOOL, NSString, char are the types of values I am pulling out of the NSDictionary and putting into their only variables.

My question what is the best way to turn these values into one big object that can then be putt into an array?

I have heard that I can use the class itself as an Object.. But I am not really sure how to do this.

or could I just put them back into a NSDictionary?… but if thats the case do NSDictionaries allow for multiple value types?

  • 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-06-09T14:07:44+00:00Added an answer on June 9, 2026 at 2:07 pm

    Actually, you are in the right path. this is basically MVC architecture way. so you are questioning about M = Model.

    Model in here example is class that defines all variables. cut to the point, here’s you should do:

    -> create a class that contain your variable, with @property & @synthesize name : ClassA.

    then you could set object ClassA into dictionary.

    ClassA *myClass = [[ClassA alloc] init];
    myClass.myString = @"test String";
    myClass.myBoolean = True;
    
    [dictionary setObject:myClass forKey:@"myObject"];
    [myClass release]; //we no longer need the object because already retain in dictionary.
    

    then retrieve it by :

    ClassA *myClass = (ClassA*)[dictionary objectForKey:@"myObject"];
    NSLog(@"this is value of myString : %@ & boolean : %i",myClass.myString,myClass.myBoolean);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an NSDictionary that holds all the data: One title (not important for
I have a class with an initializer that takes a NSDictionary: -(id)initWithVector:(NSDictionary *) vectorDictionary;
I have a method that creates a dictionary from NSJSONSerialization class. I then enumerate
I have a class, call it A that parses some data out in an
I have a simple NSDictionary that I am trying to populate with data from
the question explains it all. For instance, if I have a NSDictionary like this
I have created 5 NSDictionary's. I stored them in NSArray. I need to get
I have a class DataObject as Header ::: #import <Foundation/Foundation.h> @interface DataObject : NSObject
I am trying to pass a single array object (that is a nsdictionary of
so I'm having the most difficult of time pulling values out of an NSDictionary

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.