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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T19:31:04+00:00 2026-05-17T19:31:04+00:00

In the following UIView animation block, I do a CGAffineTransformMakeScale and a CGAffineTransformMakeRotation ,

  • 0

In the following UIView animation block, I do a CGAffineTransformMakeScale and a CGAffineTransformMakeRotation, and though the duration is set to 1.0f, the scale goes really fast and the rotation goes in 1 second like it should.

It must be my lack of understanding about how AffineTransforms are applied but I can’t figure it out.

What gives?

EDIT: Vladimir’s answer worked great. I was changing the same property twice, rather than changing two properties. To make two changes to a transform property, you have to make a transform with the initial change, then add the second change to that transform and then set you object’s transform from there. This way, you can chain as many together as you want.


CGColorRef color = [[colorArray objectAtIndex:colorIndex] CGColor];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1.0f];
[[self layer] setFillMode:kCAFillModeForwards];
[self setTransform:CGAffineTransformMakeScale(2.0, 2.0)];
[self setTransform:CGAffineTransformMakeRotation(M_PI / 4)];
[[self layer] setBackgroundColor:color];
[UIView commitAnimations];
  • 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-17T19:31:04+00:00Added an answer on May 17, 2026 at 7:31 pm
    [self setTransform:CGAffineTransformMakeScale(2.0, 2.0)];
    [self setTransform:CGAffineTransformMakeRotation(M_PI / 4)];
    

    2nd line overrides the effect of 1st line. You should construct the whole transform and then apply it to your view:

    CGAffineTransform tr = CGAffineTransformMakeScale(2.0f,2.0f);
    tr = CGAffineTransformRotate(tr, M_PI/4);
    [self setTransform: tr];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to implement the following animation: yourSubView.transform = CGAffineTransformMakeScale(0.01, 0.01); [UIView animateWithDuration:0.4 delay:0
I have the following block-based animation: [UIView animateWithDuration:0.5f delay:0.0f options:UIViewAnimationOptionRepeat|UIViewAnimationOptionAutoreverse|UIViewAnimationOptionAllowUserInteraction|UIViewAnimationOptionCurveEaseInOut animations:^{ [view.layer setTransform:CATransform3DMakeScale(1.3f, 1.3f,
I have the following animation block: [UIView animateWithDuration:3.0 animations:^{ NSLog(@INDEX %d, index); [self.visibleViewControllers_ enumerateKeysAndObjectsUsingBlock:^(id
I am starting to learn to use UIView animation. So I wrote the following
I have set up the following animation to rotate between views of different sizes.
I am moving a UIImageView with the following animation: [UIView animateWithDuration:.5 delay:0 options:(UIViewAnimationCurveLinear |
See the following animation execution block, how does the UI control pointer clickButton copy
I'm crossfading between two views using UIView animation. I've noticed the following surprising fact:
Following Apple's recommendations, I'm chaining UIView animations by putting subsequent calls to -animationWithDuration:animation: in
Using the following UIView animation with CATransform3DMakeRotation, half the UIView will disappear during 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.