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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:17:29+00:00 2026-06-01T20:17:29+00:00

i animate (move) a subclassed UIImageView like this: [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDuration: 1];

  • 0

i animate (move) a subclassed UIImageView like this:

[UIView beginAnimations:nil context:NULL];  
[UIView setAnimationDuration: 1];  
[UIView setAnimationDelay:0];
[UIView setAnimationCurve: UIViewAnimationCurveEaseOut];  
[UIView setAnimationBeginsFromCurrentState:YES]; 
if (position == 0) position = 1;
if (position > 6) position--;    
self.transform = CGAffineTransformMakeTranslation(position*120, 0);
[UIView commitAnimations];

then, i want to highlight it by let it pulsate:

CAKeyframeAnimation *bounce = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
CATransform3D forward = CATransform3DMakeScale(1.3, 1.3, 1);
CATransform3D back = CATransform3DMakeScale(0.7, 0.7, 1);
CATransform3D forward2 = CATransform3DMakeScale(1.2, 1.2, 1);
CATransform3D back2 = CATransform3DMakeScale(0.9, 0.9, 1);
[bounce setValues:[NSArray arrayWithObjects:
                   [NSValue valueWithCATransform3D:CATransform3DIdentity],
                   [NSValue valueWithCATransform3D:forward],
                   [NSValue valueWithCATransform3D:back],
                   [NSValue valueWithCATransform3D:forward2],
                   [NSValue valueWithCATransform3D:back2],
                   [NSValue valueWithCATransform3D:CATransform3DIdentity],
                   nil]];
[bounce setDuration:0.6];
[[super layer] addAnimation:bounce forKey:@"bounceanimation"];

That all works. It’s get moved by 120 Pixel but when a call the pulsate code it will pulsate on its original position, not where i’ve just moved it. why is that and how can i change it?

tobias

  • 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-01T20:17:30+00:00Added an answer on June 1, 2026 at 8:17 pm

    Okay, here’s your problem:

    self.transform = CGAffineTransformMakeTranslation(position*120, 0);
    

    Notice that you are translating the view to another spot, but like any transform, the original stats of the object stay the same.

    All you have to do is translate that code into a setFrame: method so that it actually moves the image.

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

Sidebar

Related Questions

This page is live at http://settlementprep.com/services/ $(#services_nav li a.move ).hover(function(){ $(this).stop().animate({'padding-bottom':20px},{queue:false,duration:200}); }, function() {
I have this code : function move() { $(document).mousemove(function(e){ var x = e.pageX; $('.linkHover').animate({'right':
I have this: $(#nav-reflection li).append(<span></span>); // Animate buttons, move reflection and fade $(#nav-reflection a).hover(function()
I would like to animate a widget (QPushButon) to move across my application screen.
I'm trying to animate UI elements. I would like to move an editText and
I use a jQuery .animate() to move an absolute positioned container. FF, IE and
I'm looking for information on how to move (and animate) 2D sprites across an
I'm trying to animate an image using KineticJS to move across the screen, but
I know how to move up and down an element in jQuery. $(#div).animate({left: +=100},
I need to animate the height attribute of iframe, but seems like the animate

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.