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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:46:57+00:00 2026-06-09T22:46:57+00:00

I have only included the code relevant to this label within the program. In

  • 0

I have only included the code relevant to this label within the program.

In my viewDidLoad method I have

[startLabel setHidden:NO];
startLabel.text = @"Touch to Begin";

In the touchesBegan method I then have

startLabel.text = @"Loading . .";
[self fillArrays];

Then in the fill Arrays method I fill the arrays and then hide the label –

 self.myArray = [NSArray arrayWithObjects:
             [UIImage imageNamed:@"Frame 1.png"], . .etc etc etc . . . nil]];

 [startLabel setHidden:YES];

However, the text is not updated before the Array is loaded. Resulting in the “Loading . . ” text never appearing. As it seems to be implemented after the Array is filled.

At the same time the setHidden bool is set to YES, thus one never sees the label.

I wish for the startLabel to update before the method begins to fill the Array as this takes some time. i.e. for the method to Operate sequentially.

Is this possible?

Thank You

  • 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-09T22:46:58+00:00Added an answer on June 9, 2026 at 10:46 pm

    You need to load the arrays on a different thread to that of your GUI updates.

    See this article: http://evilrockhopper.com/2010/01/iphone-development-keeping-the-ui-responsive-and-a-background-thread-pattern/

    The function you want is performSelectorInBackground

    That way your UI updates and your Background work can be done at the same time.

    You can run another function which updates the label on the main thread as well in a similar way:

    performSelectorOnMainThread

    That way you load arrays in the background, and you update your UI on the main thread (which is good because I Think the UIKit is not thread safe.

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

Sidebar

Related Questions

How do I make a textbox read only in mvc? I have included the
I have only simple data types in method signature of service (such as int,
I have only started learning python recently. I would still be considered a beginner.
I have only a very basic knowledge of SQL, so pls do forgive if
I have only started learning Python recently. Let me explain what I am trying
I have only one class with many instances. Every instance is observer of couple
I have only a little question: Why the CFPreferences-API creates multiple files in my
I have only used MapRoute and slightly wondering where Routes.Add is used and on
I have only ever dealt with database querys before in the old fashion that
I have only recently been introduced to curl and am working on a certain

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.