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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T04:23:46+00:00 2026-06-05T04:23:46+00:00

I have an algorithm that takes a few seconds to load some stuff, and

  • 0

I have an algorithm that takes a few seconds to load some stuff, and I want to first set the string on a label to say “loading” before the actual loading begins. This is all within the same layer, this is not switching between scenes.

I thought I could simply do this:

-(void)startLoading{

[self unscheduleAllSelectors];//just in case the update is already scheduled

[self.loadingLabel setString:@"Loading...."];

[self scheduleUpdate];

 }

Then, I have this:

-(void)update:(ccTime)delta{
[self unscheduleUpdate];
[self beginLoading];//another method that loads all the stuff

 }

My understanding is that my method beginLoading should not run until the next frame. Thus my label should get updated correctly. However this is not happening. There is a slight freeze while all my assets get loaded and my label never gets updated before the loading begins.

Am I missing a step?

  • 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-05T04:23:50+00:00Added an answer on June 5, 2026 at 4:23 am

    Nope ure not missing anything. I stopped fighting this and now use this kind of ‘delayed’ task catapult. It should make certain you will get a draw in the transition from the first to the second tick:

    -(void) startLoading{
        _loadTicker=0; // an NSUInteger iVar declared in the .h
        [self schedule:@selector(tickOffLoading:)];
    }
    
    -(void) tickOffLoading:(ccTime) dt{
    
        _loadTicker++;
        if(_loadTicker==1) {
            [self.loadingLabel setString:@"Loading...."];
        } else {
            [self unschedule:@selector(tickOffLoading:)];
            [self beginLoading];
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an algorithm that takes 7 days to Run To Completion (and few
If I have an algorithm that takes n log n steps (e.g. heapsort), where
I have this algorithm that I want to implement on VB6. Sub Main() dim
I have simple algorithm that clean the whitespace from half string until end. Here
We have our own data streaming algorithm that include some metadata+records+fields values. Currently we
I currently have an algorithm that generates a point grid. It takes input from
I have an algorithm that performs a breadth-first search of resources: def crawl(starting_node) items=[starting_node]
I have an algorithm that recursively makes change in the following manner: public static
I have to write an algorithm that find the path in DAG with single
I have a relatively simple algorithm that walks an std::vector looking for two neighbouring

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.