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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:58:16+00:00 2026-06-02T14:58:16+00:00

I expanded and moved a label (instructionLabel), then returned it to its original size

  • 0

I expanded and moved a label (instructionLabel), then returned it to its original size but left it in the new position.

 [UIView animateWithDuration:0.5   
                  animations:^{
                      CGAffineTransform scale = CGAffineTransformMakeScale(2.0, 2.0);
                      CGAffineTransform translate = CGAffineTransformMakeTranslation(0.0, -70.0); // up 70
                      self.instructionsLabel.transform = CGAffineTransformConcat(scale,translate);
                  }
                  completion:^(BOOL finished) {
                      [UIView animateWithDuration:0.25
                                       animations:^{
                                           CGAffineTransform scale = CGAffineTransformMakeScale(1.0,1.0);
                                           CGAffineTransform translate = CGAffineTransformMakeTranslation(0,-70.0); //left in place up 70
                                           self.instructionsLabel.transform = CGAffineTransformConcat(scale, translate);
                                       }
                                       completion:^(BOOL finished) {}
                      ];

Later, I explicitly use CGPointMake to put the label back in its original spot, but it remains in the translated position (70 pts up from its original place).

instructionsLabel.frame = CGRectMake(384, 601, 655, 40);
//Adding this doesn't make any difference, in or out.

instructionsLabel.center=CGPointMake(384, 601);

I have verified by Breaks and NSLog that the CGPointMake and CGRectMake statements are reached…they just don’t work after that affine transformation. Does anyone know why?
(I don’t want to move the label back immediately after the translation routine, but I might have to if I can’t figure out why the CGPointMake routine doesn’t do it.)

Thanks for any suggestions.
-Rob

  • 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-02T14:58:17+00:00Added an answer on June 2, 2026 at 2:58 pm

    Unless Im mistaken one of the major reason for using affine transform to scale, move etc views is that, that you can later set transform to CGAffineTransformIdentity this will cancel out any transforms you have applied. I believe that your problem here is that you are setting center to what ever position it of before you applied translate transform. View indeed moves to that point + whatever transform is applied to that view. So just set transform identity.

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

Sidebar

Related Questions

I've recently expanded a webapp, but I didn't really extend the functionality. All pages
I am attempting to expand a Child Node when its parent is expanded. Otherwise
I use PostgreSQL 8.4, but i think my question can be expanded to most
Hi all my goal is to get the child menu expanded towards the left
Update : Clarified and expanded, since the original question was simplified too far I
My configuration: Devise Devise Views expanded out Using a separate Registrations controller (moved the
I am am new to PHP/Databases... But I am picking it up fairly swiftly.
I've got a problem with adding Expanded event to my Expanders. I have expanders
Note: m4 is being used so _ prefixed strings are expanded (m4 is a
How can I restore state of nodes in VirtualStringTree (which ones were expanded) at

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.