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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T00:20:54+00:00 2026-06-15T00:20:54+00:00

I have a UILabel called nameLabel and I have it inside an animation block

  • 0

I have a UILabel called “nameLabel” and I have it inside an animation block so that this happens:

_nameLabel.alpha = 1;
CGAffineTransform translate = CGAffineTransformMakeTranslation(50, 50);
_nameLabel.transform = translate;

I thought that animates the UILabel to the spot I specify but it just animates from the above spot to the place where I have it in the Interface Builder. Any help here?

  • 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-15T00:20:57+00:00Added an answer on June 15, 2026 at 12:20 am

    Can you post the animation block and other associated code? I am not sure what CGAffineTransformMakeTranslation does with the label, but if you want to animate the frame location, you can use this:

    CGRect frame = _nameLabel.frame;
    frame.origin.y = 100; //Desired height, origin.x can be modified as well. 
    //You can also change the frame size here but it wont work on UILabels, you will need `CGAffineTransformScale` for that.
    
    [UIView animateWithDuration: 1.5
                          delay:0.0
                        options:UIViewAnimationCurveEaseInOut | UIViewAnimationOptionBeginFromCurrentState
                     animations:^ {
    
                         [_nameLabel setFrame:frame];
    
                     }
                     completion:^ (BOOL finished) {
    
                     }];
    

    Edit: The other way:

    CGRect frame = _nameLabel.frame;
    frame.origin.y = 100;
    
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationBeginsFromCurrentState:YES];
    [UIView setAnimationDuration:0.5];
    
    [_nameLabel setFrame: newFrame];
    
    [UIView commitAnimations];
    

    Current state is probably the current location of the label, try that first but if nothing happens, remove UIViewAnimationOptionBeginFromCurrentState or set the frame of the label to another location before the animation, and move it to its initial (the one in the xib file) position in the animation block, its your call.

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

Sidebar

Related Questions

I have a UILabel that displays some chars. Like x, y or rpm. How
I have a UILabel with right-aligned text that may vary from between three to
In my application I have a UILabel that holds an expanding number of entries
I have a method that gets called any time a control on my view
I have a UILabel called optionsDisplayerBrushSizeLabel who's text property I want to set to
I have a font called Sansumi-Ultralight. This is what I've done so far based
I have a subclassed UITableViewCell called Comment, which has a UILabel containing some relevant
I have a int variable called recordingStatus. I would like to listen to this
I have a button which has been added to a UILabel and that UILabel
I have a file called 'LoginViewController' that needs to do an action from the

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.