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

  • Home
  • SEARCH
  • 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 9228183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:15:39+00:00 2026-06-18T05:15:39+00:00

Another quick one: If I perform something like this: runningAnimation = YES; [self performSelector:@selector(animationsComplete)

  • 0

Another quick one:

If I perform something like this:

runningAnimation = YES;
[self performSelector:@selector(animationsComplete) withObject:nil afterDelay:0.1[;

// Return to main function
-(void) mainFunction
{
while (runningAnimation)
{
continue;
}
}

// And, animationsComplete looks like this:
-(void) animationsComplete
{
runningAnimation = NO;
}

the Program never seems to get out of the while loop.
Can anyone tell me why this is?

On another note, if this type of “wait in my code for something to finish executing” can’t really ever work in the sense that I was trying to do, is there another way to do the same thing?
To just pause in a function whilst waiting for a call of

[self performSelector:withObject:afterDelay:]

to complete?
Sorry if this seems like an amateur question.
I’m an amateur.

  • 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-18T05:15:40+00:00Added an answer on June 18, 2026 at 5:15 am

    That’s because your “performSelector:” is happening on your current (main) thread.

    If you add a line like “NSLog( @"in main function");” inside that “while” loop, as soon as your performSelector fires up, it should stop.

    You need to do the performSelector on another (detached) thread, or use a block. Some blocks can use “stop” Booleans in their arguments.

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

Sidebar

Related Questions

another newbie-question regarding rails and bootstrap. I am using something like this: <div class=tabbable
I use something like below to pass information from one unbound form to another
Another question related to this one . I have a List<SortableObjects> that is the
Im super new to Jquery so this may be a quick one. I have
Create an instance from another one of different kind/class. Quick example: you are using
I have been racking my brains on this one looking for a quick solution.
Quick question, hopefully I am just missing something simple. Ok I have one class
OK, another quick question pertaining to this. I took the advice and it works
This is a simple one. I want to replace a sub-string with another sub-string
I've got another question, although I reckon this one might be a little less

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.