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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:21:30+00:00 2026-06-10T07:21:30+00:00

I have a class with the following set: #import <UIKit/UIKit.h> #import AppDelegate.h @interface MyViewController

  • 0

I have a class with the following set:

#import <UIKit/UIKit.h>
#import "AppDelegate.h"
@interface MyViewController : UIViewController
{
    NSMutableDictionary *details;           
}
@property (nonatomic,retain) NSMutableDictionary *details;

I removed all unnecessary details for this question. In the implementation file I included @synthesize details;

I’m forwarding to this view from another view and in that class I’m getting a local dictionary:

NSMutableDictionary *getData = [responsestring JSONValue];

and I’m setting it to the mutable dictionary in this class, and I tried in two ways. Both of which are mentioned below:

objMyVc.details = [[NSMutableDictionary alloc] initWithDictionary:getData];
objMyVc.details = [getData retain];

Once I am in the MyViewController, the value details is ALWAYS null. Why is this so? Shouldn’t the value be retained in this case?

[EDIT]

I can confirm that getData is not null because I have the following check:

if ([getData valueForKey:@"VALUE"]) {

}

It is within the if statement that I’m trying to assign the value to the details dictionary and forwarding to that ViewController. I also tried to copy like below:

objMyVc.details = getData;
  • 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-10T07:21:32+00:00Added an answer on June 10, 2026 at 7:21 am

    Your code seems correct. Have you checked whether getData is null? I would also check whether details is null immediately after you initialize it. I don’t think that your problem has to do with retaining.

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

Sidebar

Related Questions

I have the following code in my AppDelegate : #import <UIKit/UIKit.h> @class PersonalDiarySystemViewController; @interface
I have the following class #import <Foundation/Foundation.h> #import <CoreData/CoreData.h> @interface Bankdaten : NSManagedObject @property
I have the following class public class UIControl { public string FName{ get; set;
I have the following models set up: class Contact < ActiveRecord::Base belongs_to :band belongs_to
I have the following function set up to sequentially fade in divs (with class
I have set up the following: Database class ($db) Pagination class ($paginator) I am
I have the following: public class Address { public string Email { get; set;
I have the following .Net class: public class Product { public int ID {get;set;}
Suppose I have the following: public class MyObject { public string Name {get; set;}
I have two entities, defined as following public class Corporation { public int Id{get;set;}

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.