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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:40:59+00:00 2026-05-20T00:40:59+00:00

I have simple object(AnimateTopDown) which animates up-down continuously , and i have several AnimateTopDown

  • 0

I have simple object(AnimateTopDown) which animates up-down continuously , and i have several AnimateTopDown objects which animates but there is no sync between all objects animation. In general how to maintain sync between objects? Is there is any way to sync between separate animation blocks?

p.s. I am using UIViewAnimation interface for animating objects.

  • 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-20T00:40:59+00:00Added an answer on May 20, 2026 at 12:40 am

    //mSyncTime can be shared/global variable

    -(NSTimeInterval) getStartDelay
    {
        NSTimeInterval delay;
    
        NSTimeInterval oldTime = mSyncTime;
        if(oldTime == 0)
        {
            mSyncTime = [NSDate timeIntervalSinceReferenceDate];
            oldTime = mSyncTime;
        }
    
        NSTimeInterval timeNow = [NSDate timeIntervalSinceReferenceDate];
    
        delay = timeNow - oldTime;
    
        SLint delayInMiliSec = delay * 1000;
        SLint animDuration = (DEFAULT_ANIM_SPPED*2) * 1000;
    
        SLint timeElapsed = delayInMiliSec%animDuration;
        delay = animDuration - timeElapsed;
    
        delay = delay/1000.0;
    
        if(oldTime == 0)
            delay = 0;
    
        return delay;
    }
    

    And before starting animation I have set the delay to the setAnimationDelay API…

    [UIView setAnimationDelay:[self getStartDelay]];
    

    It worked for me… The hack is we have to maintain a standard time and before starting any animation we need to sync our animation to that reference time.

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

Sidebar

Related Questions

I have a simple OneToMany association between 2 object Parent & Child as shown
I have a simple object that get's geocoding data from the Google Maps API
I'm relatively new to the Component Object Model specification - I have a simple
Pretty simple question: When i have a persistable object, it usually has a property
I have simple regex \.*\ for me its says select everything between and ,
I'd like to have a simple way of checking for an object to be
I have very simple question but the answer is still not clear. If i
I have a simple html application which displays words on a click of a
I have a code sample that gets a SEL from the current object, SEL
I have an object graph serialized to xaml. A rough sample of what it

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.