Latest 0.1.1
Homepage https://github.com/Handii-inc/HDDelegateButton
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Description

Redesign UIButton as delegate pattern.

Let’s change addTarget to ButtonDelegate in your code.

Usage

To run the example project, clone the repo, and run pod install from the Example directory first.

class CustomViewController: UIViewController, ButtonDelegate {
    //MARK:- Components
    private lazy var button = HDDelegateButton()

    //MARK:- Life cycle events
    override func viewDidLoad()
    {
        super.viewDidLoad()
        self.view.addSubView(self.button)
        self.button.delegate = self
    }

    //MARK:- ButtonDelegate
    func touchUpInside(sender: UIButton)
    {
        print("Tapped!!!")
    }
}

Installation

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

pod "HDDelegateButton"

Author

Handii-inc, [email protected]

License

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

Latest podspec

{
    "name": "HDDelegateButton",
    "version": "0.1.1",
    "summary": "Redesign UIButton as delegate pattern.",
    "description": "This library make UIButton to be able to implement as Delegate pattern.",
    "homepage": "https://github.com/Handii-inc/HDDelegateButton",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Handii, Inc.": "[email protected]"
    },
    "source": {
        "git": "https://github.com/Handii-inc/HDDelegateButton.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "HDDelegateButton/Classes/**/*",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This