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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T12:57:23+00:00 2026-06-03T12:57:23+00:00

Okay, so I choose to animate my label using block animation. The logic is

  • 0

Okay, so I choose to animate my label using block animation.

The logic is quite simple, I have a chart bar made of buttons, when the button is pressed, it create a label with no width, and then at the same method, the animation start to lengthen the label so that the words inside the label came out, and then after a brief 2.5 seconds delay, the label shrink again and removed from the superview.

The problem is :

  • The delay is working properly in OS 4.3.
    The animation works as intended, it shows the label, after 2.5 it fires the next animation and closed the label.

  • The delay is ignored in OS 5.0.
    After the first animation complete, it didn’t wait for the delay, instead, fires the next animation blocks immediately.

Here is some of my code regarding the animation:

UILabel *lbl = [self createLabelWithText:numString frame:CGRectMake(touchPoint.x, touchPoint.y, 0, 10) bold:YES font:@"Helvetica" fontSize:10 color:[UIColor whiteColor] textAlignment:UITextAlignmentLeft andTag:987];
    [lbl setBackgroundColor:[UIColor blackColor]];
    [lbl setAlpha:0.5];
    [self.view addSubview:lbl];

    [UIView animateWithDuration:0.3 animations:^
     {
         [lbl setFrame:lblRect];
     }completion:^(BOOL finished) 
     {
        [UIView animateWithDuration:0.2 delay:2.5 options:UIViewAnimationOptionCurveEaseInOut animations:^
         {//here the second animation delay run properly on 4.3 , but ignored at 5.0
             [lbl setFrame:CGRectMake(touchPoint.x, touchPoint.y, 0, 10)];
         }completion:^(BOOL finished) {
             [lbl removeFromSuperview];
         }];
     }];

Thanks in advance for your help!

Edit : in case of any of you wondering why this person didn’t search on google or other stackoverflow questions, in fact, I did, and sadly all the posts I found doesn’t provide me with answers I needed. 🙁

  • 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-03T12:57:24+00:00Added an answer on June 3, 2026 at 12:57 pm

    okay, i’ve found the problem. it’s not exactly the blocks animation’s fault, rather it’s the error that occures because i set my animation to shrink my uilabel to width “0”. turns out in IOS 5.0 (in my project at least) because i set my label size by using constraint, when i tried to shrink the label, as soon as it reads the label aren’t suffice to show the entire text, it immediately terminate the label it self.

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

Sidebar

Related Questions

How is it possible? I have a simple C++ app that is using SQLite3
i have a question about a very hard development thing: its okay choose ios4
Okay, This may be really simple or it may not even be possible, or
Okay, I have done a bit of searching online and found this thread, but
Okay so i have a semi weridish problem with re.sub. Take the following code:
Okay, so I have torn what I had down and am rebuilding it, here's
Okay I have a large CRUD app that uses tabs with Forms embedded in
Okay, here's my setup. I have a c# app working perfectly on all 32-bit
Okay, the specs have changed on this one somewhat. Maybe someone can help me
Okay i've seen this done somewhere before where you have a function that takes

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.