Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-18421

iOS: Add animation properties "springVelocity" and "dampingRatio"

    Details

    • Story Points:
      9
    • Sprint:
      2019 Sprint 4, 2019 Sprint 5, 2019 Sprint 6, 2019 Sprint 7, 2019 Sprint 8, 2019 Sprint 9

      Description

      Summary:
      App developers would like to apply a spring/bounce animation when a view reaches its end-point. This is desired for both translation, rotation, and scale animations.

      Proposed Properties:

      • "dampingRatio": Normalized value where 1.0 will reach its end-point without overshooting and no bounce/spring effect. A value less than 1.0 will overshoot its end-point and apply a spring animation, where the lower the value, the more the view will bounce back and forth until it slows down and reaches its end-point. A value of 0.0 will bounce back and forth forever without any damping effect.
      • "springVelocity": Scale factor where 1.0 represents the total spring animation distance traversed in 1 second. The lower the value, the slower the spring effect. The higher the value, the faster the spring animation. For example, 2.0 will reach the end-point twice as fast and 0.5 will reach the end-point at half-speed.

      Notes:
      In iOS (Swift is the example code I'm using below), there are a few spring based properties that can be added to a UIView animation, for example to get this bounce effect, it's just two properties - https://www.dropbox.com/s/n9dx2yw54kr895a/2015-01-21_08-55-58.mp4?dl=0 :

      		UIView.animateWithDuration(0.5,
      			delay: 0,
      			usingSpringWithDamping: 0.7,
      			initialSpringVelocity: 0.7,
      			options: nil,
      			animations: {
      				
      				// Animated views here
      				
      			}, completion: nil)
      

        Attachments

          Activity

            People

            • Assignee:
              vijaysingh Vijay Singh
              Reporter:
              rblalock Rick Blalock (Inactive)
              Reviewer:
              Vijay Singh
              Tester:
              Samir Mohammed
            • Watchers:
              8 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Backbone Issue Sync is enabled for your project, but we do not have any synchronization info for this issue.

                  Git Source Code