Latest 1.0.4
Homepage https://github.com/c2mInc/WobbingButton
License MIT
Platforms ios 10.0
Frameworks UIKit
Authors

WobbingButton

UIButton is not enough. Replace it with a lightweight control, the WobbingButton.

WobbingButton is a subclass of UIControl, it is a hassle free, storyboard friendly UI component.
You could set corner radius directly from storyboard as well as wobble scale, handle target functions as closures, drag drop nested components. Unchain the limits of UIButton.

WobbingButton: A lightweight storyboard friendly UIButton replacement.

Example

Try it!

pod try 'WobbingButton'

This will open up an example project which you’ll have a quick insight about the library.

Installation

WobbingButton is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod 'WobbingButton'

Alternatively drag and drop WobbingButton.swift file into your project.

WobbingButton

WobbingButton is a UIControl subclass.

WobbingButton

RoundedWobbingButton

RoundedWobbingButton is a WobbingButton subclass, it has rounded left and right corners.

WobbingButton

WobbingIcon

WobbingIcon is too a WobbingButton subclass, it is best used with monochrome icons, set tintColor in storyboard.

WobbingButton

RoundedWobbingIcon

RoundedWobbingIcon is a WobbingIcon subclass and it is like a rounded version of WobbingIcon.

WobbingButton

Basic Usage

Drag a UIView into a viewcontroller, change its class type to WobbingButton, RoundedWobbingButton, WobbingIcon or RoundedWobbingIcon. Add a background color, you are set, start wobbling.

Sometimes it’s quite useful to assign closures rather than adding target to methods. WobbingButton provides onTapAction and onLongPressAction closures to handle those actions gracefully. In addition to touch events like .touchUpInside, .touchDown, it works with tap and long press closures as well.

let wobbingButton = WobbingButton(frame: ...)
wobbingButton.onTapAction = { [weak self] in
  //  self?.wobbingButtonTapped()
}

Even long presses.

let wobbingButton = WobbingButton(frame: ...)
wobbingButton.onLongPressAction = { [weak self] in
  //  self?.wobbingButtonLongPressed()
}

Requirements

  • iOS 10.0+
  • Xcode 8.0+
  • Swift 4.0+

Author

Connected2.me / Erk Ekin @erkekin

Awesome logo: @berilKarabulut

License

WobbingButton is available under the MIT license. See the LICENSE file for more info.

Copyright (c) 2018 erkekin [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

Latest podspec

{
    "name": "WobbingButton",
    "version": "1.0.4",
    "summary": "A storyboard friendly UIButton replacement. It wobbs too!",
    "swift_version": "4.2",
    "description": "UIButton is not enough. Replace it now.nWobbingButton is a UIControl, a hassle free storyboard friendly UI component.nYou could set corner radius directly from storyboard. Notice how it "wobbles"!nRoundedWobbingButton is a WobbingButton subclass, it has rounded left and right corners.nWobbingControlWithIcon is a WobbingButton subclass, is best used with monochrome icons, set tintColor in storyboard.",
    "homepage": "https://github.com/c2mInc/WobbingButton",
    "screenshots": [
        "https://github.com/c2mInc/WobbingButton/blob/master/WobbingButton.png?raw=true",
        "https://github.com/c2mInc/WobbingButton/blob/master/RoundedWobbingButton.png?raw=true",
        "https://github.com/c2mInc/WobbingButton/blob/master/WobbingIcon.png?raw=true",
        "https://github.com/c2mInc/WobbingButton/blob/master/RoundedWobbingIcon.png?raw=true"
    ],
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "erkekin": "[email protected]"
    },
    "source": {
        "git": "https://github.com/c2mInc/WobbingButton.git",
        "tag": "1.0.4"
    },
    "social_media_url": "https://twitter.com/erkekin",
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "WobbingButton/Classes/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This