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

  • Home
  • SEARCH
  • 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 542099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T10:24:42+00:00 2026-05-13T10:24:42+00:00

I have a UIScrollView and I add 9 imageview to it using the following

  • 0

I have a UIScrollView and I add 9 imageview to it using the following code.

    for (i = 0; i < 3; i++)
       {
        for (j = 0; j < 3; j++)
        {
        imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:[NSString stringWithFormat:@"some url"]];
        frame = [imageView frame];
        frame.origin.x = x;
        frame.origin.y = y;
        [imageView setFrame:frame];
        imageView.userInteractionEnabled = YES;
        imageView.multipleTouchEnabled = YES;
        [myScrollView addSubview:imageView];
        }
       }

I thought the UIScrollView will be shown and then we will see each image being loaded in tiles. But what happens is only after loading all the images only the UIScrollView comes into appearance with all the images.
How can i make UIScrollView come first, then show each of the images being loaded?

  • 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-13T10:24:42+00:00Added an answer on May 13, 2026 at 10:24 am

    You are blocking the runloop until this whole block of code is executed. Therefore your app doesn’t get a chance to update its drawing. You need to do the drawing (more specifically, the downloading of your images) asynchronously. Once an image is downloaded, you can then add it to your UIScrollView. Note that you want to do this drawing on the main thread using a method like performSelectorOnMainThread....

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

Sidebar

Related Questions

I have added a UIScrollVIew using IB. Then using the following code i add
I have an UIImageView with an image (map) inside of a UIScrollView. I add
I have a UIScrollView with paging enabled like the following: container = [[UIScrollView alloc]
I have UIScrollView and number of objects (UIView compositions) with UIImageViews inside them. Some
I have a UIScrollview with a UIImageview inside it showing a floor plan. I
I have a UIScrollView with an Image subView. I subclass touchesEnded to add a
Following Scenario: I have a = UIViewController A that contains a UIScrollView I have
I have a UIScrollView whose content size is 1200x480. I have some image views
I am trying to add the UIButton to UIScrollView . I have added the
I have a UIScrollView which I add a couple of subviews to (done 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.