All Projects → saeid → GDCheckbox

saeid / GDCheckbox

Licence: MIT license
Customizable CheckBox / RadioButton component for iOS

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to GDCheckbox

React Icheck
🔘 iCheck components built with React. Highly customizable checkbox, radio buttons and radio group.
Stars: ✭ 175 (+660.87%)
Mutual labels:  checkbox, switch
Easy Toggle State
A tiny JavaScript library to easily toggle the state of any HTML element in any contexts, and create UI components in no time.
Stars: ✭ 261 (+1034.78%)
Mutual labels:  checkbox, switch
simple-switch
Vanilla JS/CSS Switch UI element
Stars: ✭ 18 (-21.74%)
Mutual labels:  checkbox, switch
Switch
🐰 A simple and powerful switch for checkbox.
Stars: ✭ 492 (+2039.13%)
Mutual labels:  checkbox, switch
Aiflatswitch
Nicely animated flat design switch alternative to UISwitch
Stars: ✭ 904 (+3830.43%)
Mutual labels:  checkbox, switch
Bootstrap Switch
Turn checkboxes and radio buttons in toggle switches.
Stars: ✭ 5,132 (+22213.04%)
Mutual labels:  checkbox, switch
Vxe Table
🐬 vxe-table vue 表格解决方案
Stars: ✭ 4,242 (+18343.48%)
Mutual labels:  checkbox, switch
Jhform
JhForm - 自定义表单工具,更加简单,快捷的创建表单、设置页面
Stars: ✭ 108 (+369.57%)
Mutual labels:  checkbox, switch
Flutter smart select
SmartSelect allows you to easily convert your usual form select or dropdown into dynamic page, popup dialog, or sliding bottom sheet with various choices input such as radio, checkbox, switch, chips, or even custom input. Supports single and multiple choice.
Stars: ✭ 179 (+678.26%)
Mutual labels:  checkbox, switch
vt-toggle
Turn HTML checkbox inputs into fancy toggle switches with just a CSS class
Stars: ✭ 14 (-39.13%)
Mutual labels:  checkbox
CustomWebCheckbox
An example of a make checkbox design on the web.
Stars: ✭ 12 (-47.83%)
Mutual labels:  checkbox
xash3d-switch
Check out https://github.com/fgsfdsfgs/xash3d-fwgs for an updated version
Stars: ✭ 60 (+160.87%)
Mutual labels:  switch
NSW-Custom-Game-Icons
Nintendo Switch custom game icons, icon repo for NX-GiC
Stars: ✭ 33 (+43.48%)
Mutual labels:  switch
unifi-controllable-switch
TOUGHswitch firmware to integrate with the UniFi Controller (experimental).
Stars: ✭ 24 (+4.35%)
Mutual labels:  switch
aoscx-ansible-role
Ansible roles for AOS-CX switches
Stars: ✭ 15 (-34.78%)
Mutual labels:  switch
Switch
Manage chrome extensions from the toolbar
Stars: ✭ 13 (-43.48%)
Mutual labels:  switch
view-admin-as
View the WordPress admin as a different role, switch between users, temporarily change your capabilities, set default screen settings for roles, manage your roles and capabilities.
Stars: ✭ 44 (+91.3%)
Mutual labels:  switch
RESegmentedControl
Customizable segmented control with style presets...
Stars: ✭ 76 (+230.43%)
Mutual labels:  switch
Rich-Presence-U
Display your Nintendo games on Discord.
Stars: ✭ 77 (+234.78%)
Mutual labels:  switch
gen-cisco
🧨 Generates Cisco scripts based on YAML files
Stars: ✭ 29 (+26.09%)
Mutual labels:  switch

GDCheckbox

An easy to use CheckBox/Radio button component for iOS, with Attributes inspector support.

untitled

Requirements

  • Xcode 10+
  • Swift 5
  • iOS 9+

Installation

Cocoapods

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

target '<Your Target Name>' do
    pod 'GDCheckbox'
end
pod install

Manually

Drag GDCheckbox.swift to your project!

How to use

override func viewDidLoad() {
    super.viewDidLoad()


    let checkbox: GDCheckbox = GDCheckbox()

    // Background color of the box
    checkbox.baseColor = UIColor.white

    // In case of check box, determine the animation duration of the check mark
    checkbox.animationDuration = 1.0

    // Determine if check mark should fill with animation
    checkbox.shouldAnimate = false

    // Color of the check mark / fill area -- no matter if isCurcular is on or off
    checkbox.checkColor = UIColor.red

    // Width of the check mark / fill area -- no matter if isCurcular is on or off
    checkbox.checkWidth = 3.0

    // Color of container border. If shouldFillContainer is set to true, container background also will be override with this color when CheckBox / Radio Button is selected.
    checkbox.containerColor = UIColor.blue

    // Determine if container should be filled when selected
    // Note: if set to true, it will override `baseColor` when control is selected
    checkbox.shouldFillContainer = false

    // Border width of container view
    checkbox.containerWidth = 5.0

    // Determine if it's a check box or a radio button
    checkbox.isRadioButton = false
    
    // Determine container shpae type for selected state
    // For CheckBox -> Check mark when true or square when false
    // For RadioButton -> Check mark when true or circle when false
    checkbox.showCheckMark = false

    // Set default state of the control
    checkbox.isOn = false
    
    self.view.addSubview(checkbox)
}

@IBAction func onCheckBoxPress(_ sender: GDCheckbox) {
    let state = sender.isOn ? "ON" : "OFF"
    // Trigger action
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].