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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:05:29+00:00 2026-06-07T00:05:29+00:00

My ViewController has a dataSource , which in my case has to fetch the

  • 0

My ViewController has a dataSource, which in my case has to fetch the data from a Webservice. Is it bad practise when I assume in my ViewController that the dataSource-methods will take quite long and only call them from another thread.

So I do the following:

  1. Display a list of items
  2. User touches a cell
  3. The DetailViewController is shown instantly with the parent being its dataSource
  4. The DetailViewController now
    • Displays a loading indicator
    • Asks the dataSource for the data in another Thread
    • Upon completion hides the indicator (called on the main thread)
  • 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-07T00:05:30+00:00Added an answer on June 7, 2026 at 12:05 am

    Honestly I prefer that approach to some you usually see:

    1. User Touches a cell
    2. The current UIViewController asks the DataSource for data
    3. The DataSource makes a request to the webservice.
    4. On completion the new UIViewController is loaded with data.

    Although, you might give a good experience to the user, if you put an spinner on the Cell or some kind of visual reference that shows that something is happening on the background. Either way, its sometimes a matter of taste, UX, or even client requisites.

    Is it bad practise when I assume in my ViewController that the
    dataSource-methods will take quite long

    Murphy Law… So it’s a good practice to assume that and create the necessary mechanisms for when that happens.

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

Sidebar

Related Questions

I have a ViewController class that has a property that is the model which
Working in a ViewController that has a few views which were added to it
I am loading a xib file from my viewcontroller which has a table view.
I've got a ViewController , that has a UIButton which performs the following: -
I have a ViewController that has its own NIB. I would like to embed
I want to have a ViewController that has a table view on the top
I've got a view that has a table view inside. I've got a viewController
I have a ViewController that has a couple of IBOutlet properties defined for UITextView.
I have a ViewController embedded in a NavigationController. The ViewController has a UIWebView that
I have a ViewController that contains a UITableView in which the cells are created

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.