Skip to content

Latest commit

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

WobbleView

WobbleView is an implementation of a recently popular wobble effect for any view in your app. It can be used to easily add dynamics to user interactions and transitions.

Check this project on Dribble.

Wobble

Installation

There are two options:

  1. WobbleView is available via CocoaPods.
  2. Manually add the files into your Xcode project. Slightly simpler, but updates are also manual.

Usage

Just create a WobbleView and change its position.

self.wobbleView.frame.origin =CGPoint(x: randomX, y: randomY)

or

self.wobbleView.center =CGPoint(x: randomX, y: randomY)

or animate the view's constraints.

Properties

internalvarfrequency:CGFloat=3

The frequency of oscillation for the wobble behavior.

internalvardamping:CGFloat=0.3

The amount of damping to apply to the wobble behavior.

varedges:ViewEdge=ViewEdge.Right

A bitmask value that identifies the edges that you want to wobble. You can use this parameter to wobble only a subset of the sides of the rectangle.

Requirements

  • Swift 2.0
  • Xcode 7

License

Released under the MIT license. See the LICENSE file for more info.

About

No description, website, or topics provided.

Resources

Stars

2.2k stars

Watchers

57 watching

Forks

Releases

Packages

Used by

Contributors

Languages