che

CheckboxButton

A checkbox button UI component for iOS built with Swift

Showing:

Popularity

Downloads/wk

0

GitHub Stars

49

Maintenance

Last Commit

3yrs ago

Contributors

1

Package

Dependencies

0

License

MIT

Categories

Readme

CheckboxButton

Build Status Carthage compatible

A checkbox button UI component for iOS built with Swift.

CheckboxButton image

CheckboxButton

  • A subclass of UIControl. The container will fit the frame of the control while maintaining its aspect ratio.

Installation

This project can be installed in different ways:

  • Manual
    1. Download the project
    2. Simply copy CheckboxButton.swift to your project
  • Framework
    1. Download the project
    2. Build the CheckboxButton framework
    3. Embed the framework into your project
  • Carthage
    1. Add github "chrisamanse/CheckboxButton" in your Cartfile

Usage

CheckboxButton can be used in two different ways:

  • Interface Builder
    • Simply change the class of the UIView to CheckboxButton.
  • Code
    • Use the initializer: init(frame: CGRect)

You can run the example app located in the same project to see how it's used.

Toggle

CheckboxButton will be toggled when a .TouchedUpInside event occurred. You can observe changes in state using the UIControlEvents.ValueChanged event.

You can check if the checkbox is toggled by reading the on property. You can also set this property to programmatically set the state of the checkbox.


if checkbox.on {
  print("Checkbox is checked")
}

// Toggle
checkbox.on = false // Set to false to uncheck

License

Copyright (c) 2018 Joe Christopher Paul Amanse

This software is distributed under the MIT License.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100