Latest 0.1.2
Homepage https://github.com/davnag/DJCaptureButton
License MIT
Platforms ios 10.0
Authors

Camera styled capture button with 3D touch.

DJCaptureButton

Example

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

Requirements

iOS 10.0

Installation

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

pod 'DJCaptureButton'

Usage

Manual

let captureButton = DJCaptureButton(frame: .init(x: 0, y: 0, width: 60, height: 60))
captureButton.delegate = self

view.addSubview(captureButton)
Add delegate
extension ViewController: DJCaptureButtonDelegate {

    func captureButtonDidFire(captureButton: DJCaptureButton) {
        debugPrint("Capture button action")
    }
}

Customize

captureButton.borderWidth = 4
captureButton.borderColor = .yellow

captureButton.middleCircleOffset = 4
captureButton.middleCircleColor = .blue

Interface Builder

  1. Add a UIButton in Interface Builder.
  2. Set the "class" property to DJCaptureButton.
  3. Connect the delegate.

DJCaptureButton

See the Example Project.

Customize

Additional properties are available in the Attribute inspector:

DJCaptureButton

Result

DJCaptureButton

Author

David Jonsén

License

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

Latest podspec

{
    "name": "DJCaptureButton",
    "version": "0.1.2",
    "summary": "Camera styled capture button with 3D touch",
    "description": "This is a camera styled capture button. Used for one of my apps and i wanted to share it. It uses tap and 3D Touch to fire the action.",
    "homepage": "https://github.com/davnag/DJCaptureButton",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "David Jonsu00e9n": "[email protected]"
    },
    "source": {
        "git": "https://github.com/davnag/DJCaptureButton.git",
        "tag": "0.1.2"
    },
    "swift_version": "4.0",
    "platforms": {
        "ios": "10.0"
    },
    "source_files": "DJCaptureButton/Classes/**/*"
}

Pin It on Pinterest

Share This