Latest 0.0.9
Homepage https://github.com/zqtqzy/DirectionButton
License MIT
Platforms ios 10.0
Frameworks UIKit
Authors

Demo

Contents

Requirements

  • iOS 10.0+
  • Xcode 9.0+
  • Swift 4.2+

Communication

  • If you found a bug, open an issue.
  • If you have a feature request, open an issue.
  • If you want to contribute, submit a pull request.

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate SnapKit into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
    pod 'DirectionButton', '~> 0.0.9'
end

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate SnapKit into your Xcode project using Carthage, specify it in your Cartfile:

github "DirectionButton/DirectionButton" ~> 0.0.9

Run carthage update to build the framework and drag the built SnapKit.framework into your Xcode project.

Manually

If you prefer not to use either of the aforementioned dependency managers, you can integrate DirectionButton into your project manually.


Usage

Quick Start

class ViewController: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        let btn = DirectionButton.init(frame: CGRect.init(x: 100, y: 100, width: 200, height: 200))
        btn.tapDelegate = self

        view.addSubview(btn)
    }

}

extension ViewController: DirectionButtonDelegate{
    func didTapDirectionButton(direction: ButtonDirection) {
        // Tap DirectionButton Action
    }

    func didTapCenterButton() {
        // Tap CenterButton Action

    }
}

Credits

  • zhouqitian ([@zhouqitian])
  • Many other contributors

License

DirectionButton is released under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "DirectionButton",
    "version": "0.0.9",
    "summary": "u65b9u5411u6309u94ae",
    "homepage": "https://github.com/zqtqzy/DirectionButton",
    "license": {
        "type": "MIT"
    },
    "authors": {
        "zhouqitian": "[email protected]"
    },
    "platforms": {
        "ios": "10.0"
    },
    "source": {
        "git": "https://github.com/zqtqzy/DirectionButton.git",
        "tag": "0.0.9"
    },
    "source_files": "DirectionButton/*.swift",
    "resources": "DirectionButton/DirectionButton.bundle",
    "frameworks": "UIKit",
    "swift_version": "4.2"
}

Pin It on Pinterest

Share This