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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T16:53:25+00:00 2026-05-20T16:53:25+00:00

i have some animation to be played at some point in time. that time

  • 0

i have some animation to be played at some point in time. that time is decided by some thread running in the backgroud. now i want to play the animation regardless of which screen the user is on. here is screen hierarchy.

login–>homescreen(thread starts running from viewdidload).

from home screen the user may navigate to any other screen and i want the animation to be played. right now i have the animationviewcontrller a membervariable in the homescreen and i am calling it by allocing and initing and pushing and popping when animation is done. and it works only 10% of the time. i have tried performselectoronmainthread and its still the same.

How do i redesign my code such that is plays on anyscreen.

here is my code for my thread.

[self startTimerThread];   // in viewdidload

-(void)startTimerThread
{
    homescreenthread = [[NSThread alloc] initWithTarget:self selector:@selector(setupTimerThread) object:nil];
    [homescreenthread start];
}
-(void)setupTimerThread
{
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
    NSTimer* timer = [NSTimer timerWithTimeInterval:5
                                             target:self
                                           selector:@selector(findnewmessages)
                                           userInfo:nil
                                            repeats:YES];
    NSRunLoop* runLoop = [NSRunLoop currentRunLoop];
    [runLoop addTimer:timer forMode:NSRunLoopCommonModes];
    //[runLoop addTimer:timer forModes:NSRunLoopCommonModes];
    [runLoop run];
    [pool release];
}

-(void)findnewmessages
{//finding message from server here. i am using the following request
    NSData *serverReply = [NSURLConnection sendSynchronousRequest:request returningResponse:&response error:&error];
        NSString *replyString = [[NSString alloc] initWithBytes:[serverReply bytes] length:[serverReply length] encoding: NSASCIIStringEncoding];

//i have omitted lot of other code.
}

  • 1 1 Answer
  • 1 View
  • 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-20T16:53:26+00:00Added an answer on May 20, 2026 at 4:53 pm

    use the delegate of the app to display the animation view.

    id appDelegate = [UIApplication sharedApplication].delegate;
    [appDelegate.m_window addSubview:viewController.view];
    

    Also if you are tying to draw anything on the screen it should be done on main thread.

    Please let me know if it helps.

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

Sidebar

Related Questions

As titled, how can I do that? I have been reading some Silverlight/WPF animation
I have some animation that was created in the main timeline in an FLA
I have a challenging problem I've been battling for some time now. The Problem:
I have a navigation menu that uses jquery to provide some animation effects. Unfortunately,
Title is quite self explanatory, but I have some animation being done in a
I have added some animation using jquery but it's not working: $('.test-container').click(function(){ $(this).css('background-color', 'rgb(119,
i creating an application with movie animation , i have a animation some group
Doing some jquery animation. I have certain divs set up with an attribute of
I have a storyboard like the following Duration=0:0:1 Completed=DeviceExplorer_Completed> The animation for some reason
I have some files that are uuencoded, and I need to decode them, using

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.