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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:02:13+00:00 2026-05-17T19:02:13+00:00

I am trying to manage a few animations in my scene using the following

  • 0

I am trying to manage a few animations in my scene using the following method:

  1. In a loop, create animated
    UIImageView, set the on stopped
    method. Also, store this UIImageView
    in a NSMutableDictionary. The animation ID is the same as the key in the dictionary.

  2. When this animation is stopped, get the animation ID. Use [animations objectForKey: animationID] to get the imageview object. I remove the imageview from the superview and release it. I also remove the object from the dictionary using the key.

  3. Create another animated object, rinse, repeat.

The problem is, when I go to get the object based on the key, NULL is returned. I assume this is related to how the dictionary works– it copies the values instead of retaining them. Because it is copied, I can’t actually remove that object.

How can I get NSDictionary to NOT copy these objects (so I have the original) or how do I release these animated objects and remove them from the superview when they are done animating?

  • 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-17T19:02:13+00:00Added an answer on May 17, 2026 at 7:02 pm

    NSDictionary doesn’t copy objects (only keys). The only reason you’d be getting NULL back is if you supply the wrong key, or the object has already been removed.

    It isn’t 100% clear from your description, but you seem to suggest that you “2. … remove the object from the dictionary …” and then later “… got to get the object …”. If these are two separate activities, then you most certainly won’t find the object there on the second visit.

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

Sidebar

Related Questions

I am trying to work out how to manage the following relationships A Store
I'm using jQuery to setup a timer or interval loop on a few elements
I am trying a few things in Powershell and what I don't manage to
I am trying to create a .Net Library with few Controllers, and i want
I am trying to manage session of users after authentication with ldap. The authentication
I'm trying to realize the same as in Spring error when trying to manage
I'm trying to manually manage some geometry (spatial) columns in a rails model. When
I'm trying to figure out how to manage my event ids. Up to this
I'm trying to get Django's manage.py to run with modified settings files. I have
I am trying to install VisualSVN to manage my code with other users. In

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.