Get Updates By E-mail 

Article Written By:
Johann Dowa

Open Source Component For Easily Adding A Customizable Shake Animation To UIView Subclasses

  •  
  •  
  •  
  •  
  •  

Shake animations are a great way to provide feedback to the user without needing to make additions to your UI and previously I mentioned a text field category for creating shake animations called UITextField+Shake.

Here’s an open source Swift component from Håkon Bogen called SingleLineShakeAnimation allowing you to easily add a configurable shake animation to a UIView.

With SingleLineShakeAnimation you can add both horizontal and vertical shakes, and also adjust the duration of the shake. Since SingleLineSHakeAnimation works on UIView subclasses you can easily use it to create nice feedback effects when user clicks a button, or makes an invalid entry in a text field.

Here’s an image showing SingleLineShakeANimation in action from the readme:

SIngleLineShakeAnimation

You can find SingleLineShakeAnimation on Github here.

A nice component for easily adding a shake animation.


  •  
  •  
  •  
  •  
  •  

Submit A Resource

Have you created a useful tutorial, library or tool for iOS development that you would like to get in front of our 300,000+ monthly page views from iOS developers?

You can submit the url here.

The resources we feel will appeal to our readers the most will be posted on the front page.

Comments