Latest 0.2.9
Homepage https://github.com/vysotskiyserhiy/ViewExtensions
License MIT
Platforms ios 8.0
Frameworks UIKit
Authors

Version
License
Platform

Add recognizers

let view = UIView()

view.recognize(.tap) {
    // handle tap
}

// if you need any additional setup

view.recognize(.longPress, setup: { (gesture) in
    // setup
}, handler: {
    // handle longPress
})

Extend touches zone

view.padding = 10

Same logic for UIButton

let button = UIButton(type: .infoDark)

// you can set padding to increase button response frame
button.padding = 20

button.handle(.touchUpInside) {
    // handle tap
}

Installation

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

pod 'ViewExtensions'

Author

vysotskiyserhiy, [email protected]

License

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

Latest podspec

{
    "name": "ViewExtensions",
    "version": "0.2.9",
    "summary": "UIView Extensions",
    "homepage": "https://github.com/vysotskiyserhiy/ViewExtensions",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Serhiy Vysotskiy": "[email protected]"
    },
    "source": {
        "git": "https://github.com/vysotskiyserhiy/ViewExtensions.git",
        "tag": "0.2.9"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ViewExtensions/Classes/**/*",
    "frameworks": "UIKit"
}

Pin It on Pinterest

Share This