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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:56:50+00:00 2026-05-20T03:56:50+00:00

I will try to narrate the problem in simple words. I am fairly new

  • 0

I will try to narrate the problem in simple words. I am fairly new to programming for the iOS.
I am developing an application which fetches a xml based response from server. The application consists of 4 tabs which trigger a different request and all the responses are xml based.

Problem Scenario:
Suppose i press the first tab it sends request for first set of data. In normal scenario i parse the response and display it on the screen. Screen is composed of a UIScrollView and i add subviews to make it look like a grid view of images. I request for the images while creating the grid view. The url for the images are part of the response. Again this is a async request and update the grid view based on the index. It works fine if i dont press any other tab during the whole update process. Suppose i press a different tab then it also triggers a request to server.

I am sending Async request for every fetch and storing the resposes in my data model which is basically a singleton. I can therefore access all the responses in my viewcontroller when i populate the views.

Problem arises when the first tab contents are being retrieved from server and a different tab is pressed.
I want to stop the downloading of images/responses which were initiated from the first tab press. My model is capable of holding the data received including the images and trigger a new request for image in case it was not downloaded during the first time.

During this process the UI becomes totally unresponsive. I don’t want to have a unresponsive UI.

  1. How do i efficiently do this without having to download contents twice also?
  2. Can there be a better approach to achieve this?

PS: I will paste the code if needed stripping of the unwanted details but it would be great help if you know what is a good way of sending the requests and handling them without making the UI unresponsive.
Edit:

I create 100 subviews and add it to the scroll view. During this time i cant scroll and hence it gives a feeling of hanging. How do i update the UIscroll view without having to compromise in the responsiveness?

  • 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-20T03:56:51+00:00Added an answer on May 20, 2026 at 3:56 am

    I’m writing an app that makes heavy use a web service to provide the data to display on screen. I do all downloading in an NSOperation that runs inside a NSOperationQueue of a singleton “data manager” class. The NSOperation does a “performSelectorOnMainThread” to the data manager singleton when the download is complete, the data manager stores the new data, and posts a NSNotification that it has new data available. Any UIViewController that cares about the data updates in that particular manager registers for that update notification.

    With this structure, the app UI runs very smoothly, no hiccups or stalls.

    Using the same sort of organization, it’s very easy to create a “LazyUIImageView” class that downloads its image in an NSOperation (and could show an activity indicator while waiting for image download to complete). Tables with LazyUIImageView scroll smoothly, and when the image data finally arrive, the images just “pop” right in to view.

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

Sidebar

Related Questions

I will try to explain this very simple. So, I skipped any code which
I will try to explain shortly what my problem is... I'm loading an XML
I will try to keep this as simple as possible. I have a rather
I will try to explain a simple app scenario: My app goes right to
I have a problem and I will try to explain the issue: I have
I will try my best to explain this. I have an application that show
I will try to expand my problem: I have a link: <a href=# onClick=Display();
I will try to keep it simple: In my main activity I make a
I will try to make this simple and quick.. I have never attempted this
I will try explaining the problem in as much detail as I can, without

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.