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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:22:06+00:00 2026-06-16T01:22:06+00:00

I didnt found any solution on the internet so I decided to ask my

  • 0

I didnt found any solution on the internet so I decided to ask my question here. There is this cool animation effect you can make with a buttton that if you tap it it jumps and lands like a pop. If you know what I mean. I simply mean that the button bounces like a rubberbal if you hit the floor once. I saw this effect on many different gaming apps and would like to do this in my app. It is actually like making the button bigger and immediatly smaller if it was tapped. Does anybody know how to do this?

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-16T01:22:07+00:00Added an answer on June 16, 2026 at 1:22 am

    Check this blog which describes about bounce effect on icon. That should guide you to right direction. Also check this lantean blog and this cocoanetics blog.

    This is the code he is using,

    + (CAKeyframeAnimation*)dockBounceAnimationWithViewHeight:(CGFloat)viewHeight
    {
        NSUInteger const kNumFactors    = 22;
        CGFloat const kFactorsPerSec    = 30.0f;
        CGFloat const kFactorsMaxValue  = 128.0f;
        CGFloat factors[kNumFactors]    = {0,  60, 83, 100, 114, 124, 128, 128, 124, 114, 100, 83, 60, 32, 0, 0, 18, 28, 32, 28, 18, 0};
    
        NSMutableArray* transforms = [NSMutableArray array];
    
        for(NSUInteger i = 0; i < kNumFactors; i++)
        {
            CGFloat positionOffset  = factors[i] / kFactorsMaxValue * viewHeight;
            CATransform3D transform = CATransform3DMakeTranslation(0.0f, -positionOffset, 0.0f);
    
            [transforms addObject:[NSValue valueWithCATransform3D:transform]];
        }
    
        CAKeyframeAnimation* animation = [CAKeyframeAnimation animationWithKeyPath:@"transform"];
        animation.repeatCount           = 1;
        animation.duration              = kNumFactors * 1.0f/kFactorsPerSec;
        animation.fillMode              = kCAFillModeForwards;
        animation.values                = transforms;
        animation.removedOnCompletion   = YES; // final stage is equal to starting stage
        animation.autoreverses          = NO;
    
        return animation;
    }
    
    - (void)bounce:(float)bounceFactor
    {
        CGFloat midHeight = self.frame.size.height * bounceFactor;
        CAKeyframeAnimation* animation = [[self class] dockBounceAnimationWithViewHeight:midHeight];
        [self.layer addAnimation:animation forKey:@"bouncing"];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I didnt find anything according this issue. Can jaas be used to secure my
This is my first question ever here on stackoverflow! I've been searching for a
This is my first question after leeching over here for some time.. So spare
I found there is questions asked in stackoverflow regarding this topic before but i
I have searched but i didn't found any solution to my problem. I want
Does somebody has an idea?? I've been googling it but didnt found so much
I tried to find a solution but I didn't found what I was searching
I know this has been asked before but all the answers I found didn't
I found some other questions about this, but they didn't work for me :(
I know the title didnt say much, but here I go with a clearer

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.