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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T02:42:43+00:00 2026-05-30T02:42:43+00:00

I need an advice what to do when my view controller is loading quite

  • 0

I need an advice what to do when my view controller is loading quite long?

In my situation I have an offline map made with route-me and it takes several seconds to load the map from about 100mb database, then load a lot of markers, put them on the map, etc.
If I run this code in viewDidLoad UI seems unresponsive, because after pressing on tab or button nothing happens for a few seconds while everything is loading. If I put it in viewDidAppear map somehow doesn’t get shown at all until I quit this view controller and go back to it.

  • 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-30T02:42:44+00:00Added an answer on May 30, 2026 at 2:42 am

    If it takes so long you should show a spinner or other “busy” indicator while you load your data on a background thread.

    Once your time-intensive process is complete, update the UI back on the main thread and hide your spinner/busy indicator.

    Executing code on a background thread is extremely easy – there are several ways to do it – but the easiest/most straight-forward way is probably with performSelectorInBackground:withObject: as in this example:

    [self performSelectorInBackground:@selector(loadMap) withObject:nil];
    

    When you’re ready to run on the main thread again – it’s the same thing, but in reverse using performSelectorOnMainThread:withObject:waitUntilDone::

    [self performSelectorOnMainThread:@selector(wrapupLoadMap) withObject:nil waitUntilDone:NO];
    

    Good luck.

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

Sidebar

Related Questions

I'd need advice on following situation with Oracle/PostgreSQL: I have a db table with
I really need advice on how to do the following. I have tried several
I need advice on what to do. I have several applications on App store
Need some best practice advice here... Navigation based application. Root view is a UITableView
I need advice on how to have my C# console application display text to
i need an advice on how to implement my form. I have a requirement:
I'm kind of new to iOS development and need some advice. I have a
I need advice on keyboard event handling with SDL. I have a 1st person
I need advice regarding subselect performance in MySQL. For a reason that I can't
I need advice on the following HTML: <!-- Beginning of ROW !--> <div id="row1">

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.