WobbleView is an implementation of a recently popular wobble effect for any view in your app

Overview

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

internal var frequency: CGFloat = 3

The frequency of oscillation for the wobble behavior.

internal var damping: CGFloat = 0.3

The amount of damping to apply to the wobble behavior.

var edges: 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.

You might also like...
Open-source implementation of Apple's Combine for processing values over time

CombineX 简体中文 Open-source implementation of Apple's Combine for processing values over time. Though CombineX have implemented all the Combine interfac

An alternative to using the native UIAlertController, with a thoughtful design and simple implementation.
An alternative to using the native UIAlertController, with a thoughtful design and simple implementation.

HPAlertController An alternative to using the native UIAlertController, with a thoughtful design and simple implementation. Requirements iOS 15.0 and

An example implementation of using a native iOS Notification Service Extension (to display images in remote push notification) in Titanium.

Titanium iOS Notification Service Extension An example implementation of using a native iOS Notification Service Extension (to display images in remot

The Art World in Your Pocket or Your Trendy Tech Company's Tote, Artsy's mobile app.
The Art World in Your Pocket or Your Trendy Tech Company's Tote, Artsy's mobile app.

Meta State: production Point People: Brian Beckerle, Mounir Dhahri, Pavlos Vinieratos CI : This is an Artsy OSS project. Other mobile projects are Ene

Create an easy to peek SwiftUI View to showcase your own data, catalog, images, or anything you'd like.
Create an easy to peek SwiftUI View to showcase your own data, catalog, images, or anything you'd like.

Create an easy to peek SwiftUI View to showcase your own data, catalog, images, or anything you'd like.

Displays your HomeKit temperature sensors in your menu bar
Displays your HomeKit temperature sensors in your menu bar

Temperature Glance Displays your HomeKit temperature sensors in your menu bar Screenshot Note This is a very simple app that I made for myself but dec

Save development time! Respresso automatically transforms and delivers your digital assets into your projects
Save development time! Respresso automatically transforms and delivers your digital assets into your projects

Introduction Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import the latest

Save development time! Respresso automatically transforms and delivers your digital assets into your projects
Save development time! Respresso automatically transforms and delivers your digital assets into your projects

Respresso Android client Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import

Save development time! Respresso automatically transforms and delivers your digital assets into your projects
Save development time! Respresso automatically transforms and delivers your digital assets into your projects

Respresso iOS client Respresso is a centralized resource manager for shared Android, iOS and Web frontend projects. It allows you to simply import the

Comments
  • when damping is negative and you scroll the view, the woobleview green color remains visible at random rows

    when damping is negative and you scroll the view, the woobleview green color remains visible at random rows

    Ok, I'm not sure how to properly explain this, let me know if you need a video to demonstrate and replicate the issue.

    A little background: When you release the cell and it touches the right corner it still oscillates a little until it comes to a full stop, it oscillates horizontally a little into the cell frame and outside it, this is by design and it's normal behavior.

    To replicate the issue you will have to swipe a cell and after you release it as soon as it touches the right corner you will have to scroll the view and you will see that every other row now has a negative damping that didn't finish (green color) ( the right edge of the cell is now curved and you can see a little green color because it was still finishing oscillating when you scrolled the view and it just froze in that state, this affects random cells, not just the one you swiped).

    Thanks.

    opened by mdcoin 1
  • README claims minimum target of 7.0+ but podspec lists 8.0

    README claims minimum target of 7.0+ but podspec lists 8.0

    This prevents anyone whose app runs on 7.0-7.1 from using Cocoapods to install this library. Has the minimum target actually changed to 8.0 or will it still run on 7.0+?

    opened by MrMatthewDavis 1
  • No access modifiers on WobbleView

    No access modifiers on WobbleView

    Hi,

    I tried using WobbleView as a pod in my projet but I can't create a WobbleView because of its lack of access modifiers (by default, it's internal).

    Adding public access to the WobbleView class should do the trick, but we might also want access to its "considered public" variable.

    opened by delannoyk 0
  • Multiple fixes for issues: #3 and #4

    Multiple fixes for issues: #3 and #4

    • Fixed crashing on iOS 7, deleted "perservesSuperviewLayoutMargins = false", because it is set to false by default. Fixes #3
    • Changed project deployment_target to 7.0
    • Changed podspec deployment_target to 7.0. Fixes #4
    • Added sample LaunchImages for iOS7 which does not use LaunchScreen. It prevents iOS from displaying 3,5" window on 4" iPhones while using iOS7.
    opened by kondratk 0
Owner
intent
We are an international digital product design & development studio. Programming languages: Java, JavaScript, Objective-C, Swift, Python.
intent
Compare your implementation and design, see how much they match!

DesignDetective Preview Usage You may trigger anywhere, but I personally prefer using it via Shake Gesture import DesignDetective extension UIWindow

Enes Karaosman 43 Dec 13, 2022
Static Native Template and Dynamic Styling without any other app release

FileManager Project Students and Freshers, Good opportunity for you to learn and contribute in this project. Here you would learn how you can change t

Naveen Chauhan 3 Nov 30, 2021
A native iOS UI widget for adding Spokestack to any iOS app.

A native iOS library for adding Spokestack to any iOS app. Installation Edit Podfile CocoaPods is a dependency manager for Cocoa projects. For usage a

Spokestack 6 Jun 8, 2021
Use this template as a starting point for any Swift 5 module that you want other people to include in their projects

Swift 5 Module Template Use this template as a starting point for any Swift 5 mo

James Knipe 0 Dec 28, 2021
An IPFS client/api Swift Package, with the ability to add and pin any data on iOS/iPadOS/macOS

An IPFS client/api Swift Package, with the ability to add and pin any data on iOS/iPadOS/macOS. Originally bundled with GraniteUI, pulled out for independant use by any party.

Kala 4 Dec 8, 2022
Alfred Workflow to be used with Wooshy, that brings any macOS windows to the foreground

Wooshy: Window to the Foreground! Switch apps with Alfred. Switch app windows with Wooshy: Window to the Foreground! ScreenFlow.mp4 Why Aren't you ann

G. 31 Dec 12, 2022
Lightweight app to view your WoT (BB, Blitz) stats (XVM based)

KTTC Lite Приложение для танкистов, следящих за своей статистикой! Функционал Базовая статистика аккаунта WoT, WoT Blitz Расширенная статистика XVM (W

Ярослав Стрельников 3 Aug 31, 2022
UIEnvironment - A framework that mimics the SwiftUI view's environment to replicate the value distribution thought your UIKit app.

A framework that mimics the SwiftUI view's environment to replicate the value distribution thought your UIKit view hierarchy. Overview D

Łukasz Śliwiński 15 Dec 5, 2022
Flutter package for detecting NSFW images and videos using native implementation

Flutter NSFW 1- Download, tflite modle and put it in assets folder 2 - Add the path of the tfliet to pubspec.yaml 3 - Read the file using path_provide

Syed Ahsan Ali 8 Oct 16, 2022
High-quality source code, easy implementation

High-quality source code, easy implementation

T.M 0 Nov 8, 2021