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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:26:35+00:00 2026-05-22T23:26:35+00:00

I am exploring iOS4.3 SDK & wanted to implement a particular animation effect. But

  • 0

I am exploring iOS4.3 SDK & wanted to implement a particular animation effect. But have no idea how to do it. It goes like this – I have a square box on the screen & upon user putting his finger on the box & dragging his finger the box should follow him. It’s easy till here. I was able to implement it like so –

-(void)touchesEnded:(NSSet *)touches 
          withEvent:(UIEvent *)event
{
    UITouch *touch   = [touches anyObject];
    CGPoint location = [touch locationInView:self.view];
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationDuration:2];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseOut];
    CGAffineTransform scaleTrans  = CGAffineTransformMakeScale(scaleFactor, scaleFactor);
    CGAffineTransform rotateTrans = CGAffineTransformMakeRotation(angle * M_PI / 180);
    boxView.transform = CGAffineTransformConcat(scaleTrans, rotateTrans);
    angle             = (angle == 180 ? 360 : 180);
    scaleFactor       = (scaleFactor == 2 ? 1 : 2);
    boxView.center    = location;
    [UIView commitAnimations];
}

But as the user lifts his finger, I want the box to carry on with the motion (as if with momentum). It’s like the same rubber band scrolling effect apple implements; even when u leave scrolling, the screen scrolls & slowly comes to a stop. How do I implement this?

  • 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-22T23:26:35+00:00Added an answer on May 22, 2026 at 11:26 pm

    Why don’t you consider using UIPanGestureRecognizer. You can use the translationInView: to move the box as moves the finger across. And when the gesture’s state is UIGestureRecognizerStateEnded, you could use velocityInView: to get the desired follow up effect.

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

Sidebar

Related Questions

I have recently started exploring Maven, but I feel a bit overwhelmed of all
I'm exploring the possibility of writing an application in Erlang, but it would need
I'm thinking about exploring the idea of having our client software run as a
I've been exploring use of MSys lately as an alternative, 'nix-like shell for my
I have an Internet Explorer only web application. I'm exploring what we can do
I'm new to iPhone development.I have already gone through some of the exploring pages
while exploring jQuery I came up with the following weird script. I don't see
I've been exploring different strategies for running integration tests within some Nant build scripts.
I'm exploring the XML -> XSLT -> HTML meme for producing web content. I
I'm exploring the possibility of running a Java app on a machine with very

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.