Latest 0.0.2
Homepage https://github.com/NiceThings/FlubberView
License MIT
Platforms ios 9.0
Authors

A very special UIView subclass.

Build Status
Carthage compatible
Version
License
Platform


Installation with Carthage

FlubberView is compatible with Carthage. To install it, simply add the following line to your Cartfile:

github "NiceThings/FlubberView"

Design

FlubberView consists of a UIView and a collection of subviews arranged in a grid. Each subview is attached to the 2 views immediately horizontally adjacent to it with a UIAttachmentBehavior.

The animate() function repositions each subview, causing the grid to jiggle and eventually settle.

Overview

A CAShapeLayer can be passed into the constructor to give your FlubberView coherent shape.

Overview

Usage

Configure your FlubberView at initialization time with the following parameters:

  • desiredSize: a CGSize for your FlubberView
  • damping: to put it one way, the percentage of "flubbery-ness" lost with each oscillation of your FlubberView (expressed as a value between 0 and 1)
  • frequency: the speed at which your FlubberView oscillates
  • nodeDensity: the relative concentration of subviews within your FlubberView. Enum values of low, medium, and high correspond to 9, 25, and 49

Additionaly, you can pass a CAShapeLayer into the constructor to sit on top of your FlubberView and provide a coherent shape.

After initialization, you can modify your FlubberView‘s magnitude property to change the distance that each constituent subview will "jump" during animation.

Trigger your FlubberView‘s animation by calling animate()

Inspiration

FlubberView was inspired by victorBaro‘s mighty VBFJellyView

Latest podspec

{
    "name": "FlubberView",
    "version": "0.0.2",
    "summary": "A very special UIView subclass.",
    "description": "A UIView subclass that makes use of UIKit Dynamics to animate a jiggle effect.",
    "homepage": "https://github.com/NiceThings/FlubberView",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Matt Buckley": "[email protected]"
    },
    "source": {
        "git": "https://github.com/NiceThings/FlubberView.git",
        "tag": "0.0.2"
    },
    "social_media_url": "https://twitter.com/_nicethings_",
    "platforms": {
        "ios": "9.0"
    },
    "source_files": "FlubberView/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This