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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:49:12+00:00 2026-06-06T21:49:12+00:00

I’m making an iOS app in which, if memory were not an issue, there

  • 0

I’m making an iOS app in which, if memory were not an issue, there would be thousands of images loaded on the screen simultaneously. Obviously, this is not a good approach, so what I want to do is “unrender” some of these images so that only a few are on screen at any given point, and then “rerender” them when the user takes certain actions. So my question is, how could I do this?

Or, if it’s any easier, all of the images are the same; I know this may sound kind of weird, but yes my app could require thousands of the same image to be loaded on screen. Since this is the case, is memory management not really an issue since they’ll all be referencing the same file? (and by not an issue, I mean such that I can just use the hidden property to change what is and is not on screen). If I can do this, I was doing

UIImage *image = [[UIImage alloc] initWithContentsOfFile:@"image.png"];
UIImageView *imageView = [[UIImageView alloc] initWithImage:image];
[scrollView addSubview:imageView];

(scrollView is a UIScrollView that I was using to give pinch to zoom functionality to the UIImageView). The issue, though, is that when I do this the UIImageView isn’t rendered at all.

Any other ideas or suggestions are of course appreciated, and thanks in advance 😀

  • 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-06T21:49:15+00:00Added an answer on June 6, 2026 at 9:49 pm

    The answer depends upon your UI. When you say thousands of images, how many are visible at one time. Is it kind of like a huge photo gallery where only a few are actually visible at any given time? In that case, you’d probably just maintain views for just the images visible at the time, and the ones that are scrolled off the visible screen will not have any views associated with them until they scroll on (and those that are were visible but are now scrolled off will be released).

    But if you’re dealing with a different problem, tons of little images, many of which may be visible at the same time, that’s a different problem (addressed with links like that provided by qegal).

    I assume you’re trying to do something more like the latter, but regardless, you have to give us a slightly better idea of the nature of the images and what sort of user experience we’re dealing with here.

    Update:

    Sounds like you’re doing something more like the former. In that case…

    Check out PhotoScroller, Apple’s example of navigation through a large collection of images (only three images are in the app, but you get the idea).

    Personally, I have a low tech implementation, where I have a photo browser where I’m panning horizontally (UIPanGestureRecognizer) through a large collection of images (roughly 100, but could just as easily be many, many more). My view controller, though, only has three UIImageView controls, one for the main image being shown, one for the one to the previous image (and it’s frame is set just off screen to the left), and one for the next image (and it’s frame is set just off screen to the right). As I receive continuous feedback from the UIPanGestureRecognizer, I adjust all three frames by the horizontal portion of the translationInView of the gesture recognizer (I’ve seen other implementations that use a scrollview to coordinate the movements of the images, but the idea is still the same). When I let go, my gesture recognizer figures out whether I successfully swiped to the next or previous image, completes that animation, and when it’s done, it relocates the three UIImageViews (previous offscreen to the left, current on screen, and next offscreen to the right) and reloads the three image views with the appropriate “current”, “previous”, and “next” images. At that point you’re ready for another swipe with your gesture recognizer.

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

Sidebar

Related Questions

I would like to run a str_replace or preg_replace which looks for certain words
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I would like to count the length of a string with PHP. The string
I am trying to understand how to use SyndicationItem to display feed which is
I used javascript for loading a picture on my website depending on which small
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I need a function that will clean a strings' special characters. I do NOT

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.