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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:12:58+00:00 2026-05-26T04:12:58+00:00

i m loading an image from an url and displaying it in imageView .i

  • 0

i m loading an image from an url and displaying it in imageView .i m using NSBLockOperation to load the image and it runs in the background and it takes time to load the image in imageview..is there any way to increase the performance so that it takes less time..below is the code.

NSOperationQueue *queue=[[NSOperationQueue alloc]init];
NSBlockOperation *operation=[NSBlockOperation blockOperationWithBlock:^{

    [activityIndicator startAnimating];
    NSString *imagefile = [banner1 objectAtIndex:0]; 
    NSURL *url1=[NSURL URLWithString:imagefile];
    NSData *data = [NSData dataWithContentsOfURL:url1];
    UIImage *ui=[[UIImage alloc]initWithData:data];
    bigbanner.image=ui;
    [activityIndicator stopAnimating];
    bigbanner.alpha=0.0;

}];
[operation setCompletionBlock:^{
    [UIView animateWithDuration:3.0 animations:^{bigbanner.alpha=2.0;}
                     completion:^(BOOL finished){}];
}];

[queue addOperation:operation];

enter image description here

  • 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-26T04:12:58+00:00Added an answer on May 26, 2026 at 4:12 am

    I would guess that your limiting factor is the image download.
    Loading an image and placing it on screen happens quite fast on iOS.

    Other than changing your three second fade-in to a shorter interval, I think you’re stuck.

    You might try doing the download using [NSURLRequest], but I doubt you’ll notice a major difference.

    I’d say your options are (ranked in order of speed):

    1. cache or include images in your bundle (don’t download).
    2. make your images smaller
    3. increase the speed of your server

    Also: a side note, and hopefully someone else passing through can answer this… is setting the image property of a UIImageView from a non-main-thread safe to do? I was under the impression that everything that happened to the UI was supposed to happen on the main thread.

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

Sidebar

Related Questions

I'm loading the image from the url by using LoadImage method and storing it
Im loading an image from a SQL CE db and then trying to load
I use below code to load image from URL in my winodws phone 7
Normally if you were loading an image from a URL you would do the
I am loading an image from an URL on button click, and storing it
I'm trying to load an image from a url inside of drawRect: . Our
I want to load an image from url on a button click & to
I'm trying to load a gif image from a url into a java.util.image.Raster so
I am loading image from url coming from xml image not showing image CGRect
I'm loading an image from a file, and I want to know how to

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.