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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T05:50:29+00:00 2026-05-28T05:50:29+00:00

I am using iPhone to get data from my web service. Because I wan’t

  • 0

I am using iPhone to get data from my web service.
Because I wan’t to display loading view while getting data I invoke web service synchronous.
I have button which navigate to table view (that get data from ws):

Loading *loading = [[Loading alloc]init];
[[[UIApplication sharedApplication] keyWindow] addSubview:loading.view];

TableViewController *tableViewController = [[TableViewController alloc] init];

[self.navigationController pushViewController:tableViewController animated:YES]; 
[loading.view removeFromSuperview];

And I call web service in viewDidLoad of my view.

webData = [NSURLConnection sendSynchronousRequest:req
                                returningResponse:&response
                                            error:&error]; 

NSString *xml= [[NSString alloc] initWithBytes:[webData mutableBytes] 
                                        length:[webData length] 
                                      encoding:NSUTF8StringEncoding]; 
// Parse XML etc.

I have tried to add loading view before I call web service (in viewDidLoad) but still doesn’t work.
Any idea how to display loading view?

  • 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-28T05:50:29+00:00Added an answer on May 28, 2026 at 5:50 am

    You should call the web service asynchronously. By doing it synchronously, you are blocking the main (UI) thread & it can’t finish loading your view or make it appear (or animate things on the loading view), etc.

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

Sidebar

Related Questions

I'm writing an iPhone app that requests data from a web service, and in
I'm using ASIHTTPRequest API to get some JSON data from a web side. I'm
Im trying to get a slider on an iphone web app, I'm using iui
In my iPhone application I get json data from a remote server, parse it
My iphone application captures the realtime data from camera using AVFoundation's AVCaptureSession. I'm able
i need to get data along with images from .net web server. i have
I'm using the ASIHTTPRequest package to send some data from the iPhone to my
Is there a way using the iPhone SDK to get WiFi information? Things like
I am using the MapKit for the iPhone and have it setup to get
In my iphone application i want Device Token using the APN. How to get

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.