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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T06:25:44+00:00 2026-05-29T06:25:44+00:00

I can perfectly load my map view with annotations the first time. However, if

  • 0

I can perfectly load my map view with annotations the first time. However, if i try to reload the map on a button click (after its already loaded), the user has to wait till the process completes.
This problem has arisen because on reload, the new annotations dont appear until the mapview is moved significantly, that’s when the viewForAnnotation fires. I’ve seen two other questions similar to mine with solutions involving ‘performSelectorInBackground‘ & ‘performSelectorOnMainThread‘. The former didnt work for me 🙁 & the latter i dont want to do (though it’s the only option that works) as i want the user to be able to interact with the map while the annotations load without blocking the main thread. I’m aware that such animations are best done on the main thread, so the question(s) 1. Is there no other way to do it than having the user wait till the map reloads? 2. Suggestions on the best way to do it?
Thanks in advance.

  • 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-29T06:25:45+00:00Added an answer on May 29, 2026 at 6:25 am

    You can use a dispatch queue block to achieve this
    here is the syntax
    You can create your on private queue like this

    dispatch_queue_t queue = dispatch_queue_create("com.MyApp.AppTask",NULL);
    dispatch_queue_t main = dispatch_get_main_queue();
        dispatch_async(queue, 
        ^{
            //do the fetching of data here(Don't do any UI Updates)
            dispatch_async(main, 
            ^{
               // Do the UI Update here.
             });
    
         });
    

    Apple has referred to this as recursive decomposition.
    In this bit of code the computation is offloaded onto a background thread with dispatch_async() and
    then dispatch_async() back into the main queue which will schedule our block to run with the updated data that we computed in the background thread.

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

Sidebar

Related Questions

ok so i can load a mesh perfectly but loading its texture is not
Code can be perfect, and also perfectly useless at the same time. Getting requirements
How can I only load the annotations that are within the displayed region? At
I wonder if They can work perfectly together...
I have a (from what I can tell) perfectly working Linux setup (Ubuntu 8.04)
Why can't enum's constructor access static fields and methods? This is perfectly valid with
I have a C++ application that works and compile perfectly. I can execute and
What I would like to do is create a map after an element is
I have some tabs that load ajax content. When I click on the tabs
In django, I can render a html template from a view action like this:

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.