Latest 0.0.2
Homepage https://github.com/HongliYu/DPDraggableButton-Swift
License MIT
Platforms ios 10.0, requires ARC
Frameworks UIKit, Foundation
Authors

DPDraggableButton-Swift

Drag or tap the button to trigger Gesture event

Cocoapods
Pod License

screenshot

Usage


    draggableButton.tapBlock = {
      [weak self] in
      guard let strongSelf = self else { return }
      strongSelf.refreshLog("[single tap]")
    }

    draggableButton.doubleTapBlock = {
      [weak self] in
      guard let strongSelf = self else { return }
      strongSelf.refreshLog("[double tap]")
    }

    draggableButton.longPressBlock = {
      [weak self] in
      guard let strongSelf = self else { return }
      strongSelf.refreshLog("[longpress]")
    }

    draggableButton.draggingBlock = {
      [weak self] in
      guard let strongSelf = self else { return }
      strongSelf.refreshLog("[dragging]")
    }

    draggableButton.dragDoneBlock = {
      [weak self] in
      guard let strongSelf = self else { return }
      strongSelf.refreshLog("[drag done]")
    }

    draggableButton.autoDockingBlock = {
      [weak self] in
      guard let strongSelf = self else { return }
      strongSelf.refreshLog("[auto docking]")
    }

    draggableButton.autoDockingDoneBlock = {
      [weak self] in
      guard let strongSelf = self else { return }
      strongSelf.refreshLog("[auto docking done]")
    }

Latest podspec

{
    "name": "DPDraggableButton",
    "version": "0.0.2",
    "summary": "Draggable Button",
    "description": "Drag or tap the button to trigger gesture event",
    "homepage": "https://github.com/HongliYu/DPDraggableButton-Swift",
    "license": "MIT",
    "authors": {
        "HongliYu": "[email protected]"
    },
    "source": {
        "git": "https://github.com/HongliYu/DPDraggableButton-Swift.git",
        "tag": "0.0.2"
    },
    "platforms": {
        "ios": "10.0"
    },
    "requires_arc": true,
    "source_files": "DPDraggableButtonDemo/DPDraggableButtonDemo/DPDraggableButton/*.swift",
    "frameworks": [
        "UIKit",
        "Foundation"
    ],
    "module_name": "DPDraggableButton",
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This