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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T01:10:00+00:00 2026-06-08T01:10:00+00:00

i would love to have some help or any keyword that i can use

  • 0

i would love to have some help or any keyword that i can use to search for.

My problem is I have one UIView, called “UpdateViewController.xib” that load 20 small images and text below those images by programmatically.
and when user click on those images it will change to next view that i created by IB, called “imageSumVuew.xib” and i have a button to link back to UpdateViewController.

#import "imageSumView.h"  // next view that i wanna load//
// the transition to next view
imageSumView *nextView = [[imageSumView alloc]init];
self.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:nextView animated:YES completion:NULL];
[nextView release];

in the nextView i have code similar to this which come back to this view

#import "UpdateViewController.h"  // old that i wanna load back//
    // the transition to old view
    UpdateViewController *oldView = [[UpdateViewController alloc]init];
    self.modalPresentationStyle = UIModalTransitionStyleCrossDissolve;
    [self presentViewController:oldView animated:YES completion:NULL];
    [oldView release];

the problem is when it did load back to UpdateViewController, all my images and text has to reload all over again.

The question is ” how can i keep cache of the UpdateViewController view?“, i don’t want user to reload images all over again because they have to go back and forth between this page for several times to see which image that they wanna pick.

Think of Instragram that you see list of your friends images then you wanna check your first friends’s photo and after that you come back to overall image of your friends without loading and choose second friends.

  • 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-08T01:10:02+00:00Added an answer on June 8, 2026 at 1:10 am

    Store image data with unique id to temporary directory once it is downloaded for the first time. For the next time check for that user id’s image in your directory, if it is there then load image from there. For example :

     #define TMP NSTemporaryDirectory() 
        NSString *filename=[NSMutableString stringWithFormat:@"userimage_%@",userId];
    
        NSString *uniquePath = [TMP stringByAppendingPathComponent:filename];
        NSData *dataImage = [NSData dataWithContentsOfURL:[NSURL URLWithString:imageUrl]]
        UIImage *image = [[UIImage alloc] initWithData: dataImage];
        [UIImageJPEGRepresentation(image, 1.0f) writeToFile: uniquePath atomically: YES];
        [image release];
    
    

    To get ur image you can do something like below:

    - (NSData *) getImage: (NSString *)userId 
    {
        NSString *filename=[NSMutableString stringWithFormat:@"userimage_%@,userId];
        NSString *uniquePath = [TMP stringByAppendingPathComponent: filename];
    
        if([[NSFileManager defaultManager] fileExistsAtPath: uniquePath])
        {
            return [[NSData alloc] initWithContentsOfFile:uniquePath];
        }
        return nil;
     }
    
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I would love to get some tips from other people that have had this
I have been stuck on this problem for too long and would love some
Ok here's a little problem I would love to get some help on. I
I have no experience with regular expressions and would love some help and suggestions
Would love some opinions on this problem I'm trying to workout. I'm trying to
Some help with some T-SQL would be most appreciated. I have the following four
im having a problem with some code that i have. I have the following
I have a LinearLayout that I use as a container for some buttons and
any help with this would be great. I have a model public class Master
Hey everyone I am a newbie and would love some help. I got the

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.