Giter Site home page Giter Site logo

uicheckbox.swift's Introduction

Storage

Platform: iOS 8+ Language: Swift 2 CocoaPods compatible License: MIT

Installation โ€ข Issues โ€ข License

UICheckbox is simple as hell and lightweight class to add 'checkbox' UI component in iOS application. For now it inherits from UIButton but this probably will change in upcoming versions.

Demo

Demo UICheckbox

Compatibility

UICheckbox requires iOS 8+ and is compatible with Swift 3 projects (for Swift 2.3 support, please check swift-2.3 branch). Please, don't count for Objective-C support ;)

Installation

As for CocoaPods, use this to get the latest release:

use_frameworks!

pod 'UICheckbox.Swift'

And import UICheckbox in the files you'd like to use it.

Usage

A custom params available from Interface Builder

  • border width
    Border width of our UICheckbox
  • border color
    Border color of our UICheckbox
  • corner radius
    Radius if we don't want to have square UICheckbox
  • padding
    Padding of our UICheckbox to increase the 'touch' area (especially for smaller ones)

UICheckbox is a subclass of UIButton (at least for now), so you can add it by adding UIButton class and then just change the class to UICheckbox

Callback to be notified about UICheckbox state changes:

checkbox.onSelectStateChanged = { (checkbox, selected) in
    debugPrint("Clicked - \(selected)")
}

Example

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

Author

Marcin Polak - mpolak87(at).gmail.com

Contribution

Feel free to fork the project and send us a pull-request! ๐Ÿ˜Ž

License

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

uicheckbox.swift's People

Contributors

kerolos-sss avatar polok avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

uicheckbox.swift's Issues

Doc fix

Your pod name is wrong in your README. It should be

pod 'UICheckbox.Swift'

instead of

pod 'UICheckbox'

as that belongs to someone's else

Check Box Title

How do we set title to the button? So the user can either click on the checkbox or the title of the check box.
Thanks before hand!

Swift 5?

Any plans for an update to Swift 5 and the associated Swift Package Manager? Thanks.

How to set checkmark color?

Hi and thanks for the great work!

I was wondering if there's any way to change the checkmark color? I have tried a few things but there doesn't seem to be an easy way to do. Any workaround for this?

Thanks,

import

import UICheckbox_Swift
, not just UICheckbox

Please add usage description

Please add some details to show how to add checkbox to an existing project.
It took me a while to wonder to add a UiView to storyboard and then Change its class type to Checkbox inside identity inspector.

Failed to render and update auto layout status: no suitable image found

Hi all!
I imported this library with cocoa pods and pasted it in the interface builder by dragging a normal UIView where I want the checkbox and then changing the class of the UIView to UICheckbox. Since then the interface builder doesn't render the ViewController properly and I get the error: "Failed to render and update auto layout status: no suitable image found"

What can I do, to make this error go away?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.