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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:00:42+00:00 2026-06-10T03:00:42+00:00

The scenario is: There is a view which has a button that takes user

  • 0

The scenario is:

There is a view which has a button that takes user to another view. In the viewDidLoad of the next viewcontroller, a huge XML file gets downloaded, parsed and displayed on the screen. This way, I get the data already displayed on the screen when the view is navigated to it.

The problem is:

When I click on the button that calls the viewcontroller with parsing in it, the application becomes unresponsive. As soon as all the data is downloaded and parsed, the application moves to the next view. Now, I want to show an activity indicator on the click of that button till the time the application is being unresponsive. As soon as the view navigates to the other one, the activity indicator should stop. I tried putting activity indicator in the viewDidLoad of the ViewController I want to land to but to no avail.

PS: I can’t do the parsing in the “viewWillAppear” because of some restrictions due to the nature of application.

Looking forward to the replies.

  • 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-10T03:00:43+00:00Added an answer on June 10, 2026 at 3:00 am

    You should do any major work that doesn’t involve the UI in a background queue/thread.

    Using GCD, that might look something like this:

    // Start UIActivityIndicator
    
    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
    
        // Parse your XML
    
        dispatch_async(dispatch_get_main_queue(), ^{
    
            // Update the UI when you're finished
    
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My scenario is that In MVC my page(view) has both user control(partial view) and
In my project there is a scenario that user will log in -> browse
I am creating a mail like scenario where a user has a next and
Scenario : There is this online questionaire that will be filled in by various
The scenario is there are two Android phones A and B. Phone A has
Are there any security exploits that could occur in this scenario: eval(repr(unsanitized_user_input), {__builtins__: None},
Consider these two scenarios: a user presses a button in a view (e.g. Fulfill
I am trying to create a form which has a TextAreaFor email addresses. There
Scenario: There is a website with 700-900 concurrent unique visitors at any given time.
scenario : there is some pages [ example home ,about us ,contact us etc]

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.