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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T00:54:27+00:00 2026-05-27T00:54:27+00:00

I am trying to perform an animation on a label where a flip animation

  • 0

I am trying to perform an animation on a label where a flip animation happens and after it is done and after a delay, The text of the label changes.

It seems that the delay never happens. The text immediately changes after the flip completes although I am using UIView animateWithDuration:0.5 delay:4.0 in the completion block. If Instead I do a performSelector with Delay in the completion block (the commented statement) it works as expected. Any idea why the delay value is being ignored?

- (void) flipShapeWithText:(NSString *)text {

    [UIView transitionWithView:someLabel duration:0.15 options:UIViewAnimationOptionTransitionFlipFromLeft animations:^{
        someLabel.text = text;  
    }completion:^ (BOOL finished){
//        [self performSelector:@selector(updateLabelText:) withObject: @"New Text" afterDelay:4.0];
    [UIView animateWithDuration:0.5
                              delay:4.0
                            options: UIViewAnimationOptionTransitionCrossDissolve
                         animations:^{
                             currentShapeNameLabel.text =  @"New Text" ;}
                         completion:nil];
    }];
}
  • 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-27T00:54:28+00:00Added an answer on May 27, 2026 at 12:54 am

    The delay param of animateWithDuration:delay:options:animations:completion specifies the delay before the animation occurs. You are setting the text within the animation block so after the delay is over, the animations begin which immediately changes the text as that change is not animatable. To do what you want, change the text in the completion block as follows:

        [UIView animateWithDuration:0.5
                              delay:4.0
                            options: UIViewAnimationOptionTransitionCrossDissolve
                         animations:^{ // anything animatable }
                         completion:^(BOOL finished) {
                             currentShapeNameLabel.text =  @"New Text" ;}];
    

    You can eliminate the delay if you want the animation to start immediately. If you want the text change to happen 4 secs after the animation completes add that delay in the completion block either with dispatch_after() or performSelector:withDelay:.

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

Sidebar

Related Questions

Context: I am trying to perform a custom animation from a normal UIViewController.view to
I am trying to perform an animation on each bar in the chart, however
I'm trying to create a looping animation that starts on onmousedown and stops on
I'm trying to perform a simple animation using Cocoa. One button causes an image
I'm trying to loop over multiple UIViews and perform animation on each, but I'd
Trying to perform a very simple task here. I have an <ol> that contains
I'm trying to perform a custom animation on an Activity transition. The activity is
I'm trying to perform auto repeat of my image rotation animation with CABasicAnimation. I
I have two animations that I'm trying to perform on a UILabel on the
Trying to perform a single boolean NOT operation, it appears that under MS SQL

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.