Latest 0.0.2
Homepage https://github.com/nikitabelosludtcev/ActivationToggle
License Apache
Platforms ios 8.0, requires ARC
Frameworks UIKit
Authors

ActivationToggle Swift 5.0 Cocoapods Compatible

Sample

Toggle control that transforms to checkmark on activation.

Installation

ActivationToggle requires iOS 8.0 or later.

Using CocoaPods

  1. Add the pod ActivationToggle to your Podfile.

pod ‘ActivationToggle’

  1. Run pod install from Terminal, then open your app’s .xcworkspace file to launch Xcode.

Manual

Drag ActivationToggle.swift file to your project sources.

Basic Usage

Import the module.

import ActivationToggle

Just create a toggle and configure it

override func viewDidLoad() {
super.viewDidLoad()

let toggle = ActivationToggle()

toggle.onColor = UIColor.purple
toggle.offColor = UIColor.darkGray
toggle.toggleColor = UIColor.green

toggle(self, action: #selector(valueChanged(control:)), for: .valueChanged)

view.addSubview(toggle)
}

Demo

Build and run the ActivationToggle-Example project in Xcode to see ActivationToggle in action.

TODOs

  • [ ] Add swipe gesture handling and animations

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.

Contact

Nikita Belosludtcev

License

This project is available under the Apache License, version 2.0. See the LICENSE file for more info.

Latest podspec

{
    "name": "ActivationToggle",
    "version": "0.0.2",
    "summary": "Toggle control that transforms to checkmark on activation.",
    "homepage": "https://github.com/nikitabelosludtcev/ActivationToggle",
    "license": {
        "type": "Apache",
        "file": "LICENSE"
    },
    "authors": {
        "Nikita Belosludtcev": "[email protected]"
    },
    "source": {
        "git": "https://github.com/nikitabelosludtcev/ActivationToggle.git",
        "tag": "0.0.2"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "ActivationToggle/Classes/**/*",
    "frameworks": "UIKit",
    "requires_arc": true
}

Pin It on Pinterest

Share This