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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T23:11:50+00:00 2026-06-04T23:11:50+00:00

I have a UILabel I want to animate growing and shrinking. While the size

  • 0

I have a UILabel I want to animate growing and shrinking. While the size changes I need the bottom left corner to remain static so that it always appears directly above a bottom toolbar. I am using the following code to make the label grow:

[UIView animateWithDuration:kAnimationDuration delay:0.0 options:UIViewAnimationCurveEaseInOut 
                 animations:^{  
    CGFloat lblHeight = 42.0f;
    [label setFrame:CGRectMake(0.0, 
                CGRectGetMaxY(self.view.bounds) - kBottomBarHeight - lblHeight, 
                CGRectGetMaxX(self.view.bounds), 
                lblHeight)];                
} completion:^(BOOL finished) { }];

and to make it shrink I use the same logic except that lblHeight is set to 17.0f

The view correctly grows but when I try to shrink it the frame change animation is not animated. It blips into the new size and then animates into the new origin/location. I need the frame change to be animated. Can anyone see what I’m doing wrong?

  • 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-04T23:11:52+00:00Added an answer on June 4, 2026 at 11:11 pm

    After some tinkering I’ve managed to get the desired behavior by doing the following.

    In the expand method, I use the UIView animation to alter the frame.
    In the shrink method, I use the UIView animation to alter the bounds and center.

    I’m a little baffled as to why this works but trying to shrink with the frame does not. If anyone can share some insight into this that would be great.

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

Sidebar

Related Questions

I have a UILabel coded programmatically. I want to change the size of the
I have a UILabel that is modified while using my app. I want the
i have UILabel (cocoa touch framework) and i want to right and left justify
I have a UILabel control in a view. I want to detect touch event
I have a custom table cell with a UILabel in. What I want can
i have a problem, i want set text of a UILabel or UItextView or
I have a UILabel which contains textvalue and i want to bold a particular
I have IBOutlet UILabel *label; and I want to do this UILabel *label =
I have a UILabel with some text on it, what I want is if
I have a UILabel and when the value change in the label, I want

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.