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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T03:07:32+00:00 2026-05-20T03:07:32+00:00

I am using a pan gesture to drag an item in my app. I

  • 0

I am using a pan gesture to drag an item in my app. I know I could use a UIScrollView to get that “bounce” effect when dragging to an edge. However, that seems like a hack, so I’d like to find a way to get that effect when manually dragging an item (setting its frame or center point). I’m curious if there’s a standard way, or a physics library in the Accelerate framework, something like that which wouldn’t require me implementing my own physics engine.

  • 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-20T03:07:32+00:00Added an answer on May 20, 2026 at 3:07 am

    The standard UIView animation curve is one that uses the accelerate / decelerate curve, which should gives a nice “bounce back” action.

    It’s really easy to use. Once you decide you want to “snap back” to a location, do this:

    [UIView beginAnimations:nil context:nil];
    CGRect newFrame = viewToAnimate.frame;
    newFrame.origin.x = snapBackXcoordinate;
    viewToAnimate.frame = newFrame;
    [UIView commitAnimations];
    

    to entirely emulate the UIScrollView you’ll also need to set a “maximum stretch” distance before you stop stretching more.

    But why re-invent the wheel? The UIKit components you’re given are there to use. If putting your view into a UIScrollView does the trick, go ahead and use it. Saves you develop and debug time.

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

Sidebar

Related Questions

I'm using a pan gesture to move around an image. You touch down, drag,
Im trying to create a simple pan and zoom app using silverlight 4, but
I have a 2d map that the user can zoom and pan using the
In my app I have added the new Gesture Recognizers that are available in
I Have a canvas full of objects that I zoom and pan using this.source
Hello I am currently using the smoothZoom plugin in a project (http://codecanyon.net/item/smooth-zoom-pan-jquery-image-viewer/511142). I have
I have an ImageView that you can use to do a one-finger pan, or
i am developing simple game application just using pan gesture and cgaffinetransform rotate application
Im using pan gesture for showing different images. Pan gesuture is detecting correctly. The
I've created a custom view that resizes CALayers in when a pan gesture is

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.