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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T18:25:10+00:00 2026-06-10T18:25:10+00:00

Possible Duplicate: How can I animate the movement of a view or image along

  • 0

Possible Duplicate:
How can I animate the movement of a view or image along a curved path?

I have an iOS application that I want to animate a falling leaf (or several). I have my leaf image in an ImageView and I’ve figured out a simple animation from the documentation:

[UIView animateWithDuration:4.0f
                          delay:0
                          options:UIViewAnimationTransitionFlipFromLeft
                          animations:^(void)
                          {
                              leaf1ImageView.frame = CGRectMake(320, 480, leaf1ImageView.frame.size.width,leaf1ImageView.frame.size.height);
                          }
                          completion:NULL];

This will make the leaf go from its starting position to the bottom right corner in a straight line. How would I animate this to follow a path or curve like a parabola or sinusoid and maybe even rotate the image or view? Would this be done in the animations block? Thanks in advance!

  • 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-10T18:25:12+00:00Added an answer on June 10, 2026 at 6:25 pm

    You can do this with a CAKeyframeAnimation and a CGPath. The code looks something like this:

    CAKeyframeAnimation *leafAnimation = [CAKeyframeAnimation animationWithKeyPath:@"position"];
    leafAnimation.duration = 10.0;
    leafAnimation.path = /* your CGPathRef */;
    [leaf1ImageView.layer addAnimation:leafAnimation forKey:@"leafAnimation"];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Can you animate a height change on a UITableViewCell when selected? This
Possible Duplicate: Can I scroll a ScrollView programmatically in Android? I have a chat
Possible Duplicate: Can we use any other TAG inside <ul> along with <li>? Or
Possible Duplicate: Can Read-Only Properties be Implemented in Pure JavaScript? I have an Object
Possible Duplicate: Can anybody suggest the best image resize script in php? I'm still
Possible Duplicate: Why can't I push a new view controller onto the current view?
Possible Duplicate: Can I install Python 2.7.1 64bit along side of an exsiting 32bit
Possible Duplicate: Can I embed a custom font in an iPhone application? Hi I
Possible Duplicate: Can I change all my links to just //? I've learnt that
Possible Duplicate: Can we solve the table row background image problem, in chrome, in

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.