All Projects → BeauNouvelle → Simplecheckbox

BeauNouvelle / Simplecheckbox

Licence: mit
A simple Checkbox

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Simplecheckbox

Switch
💊 An iOS switch control implemented in Swift with full Interface Builder support
Stars: ✭ 132 (-47.83%)
Mutual labels:  cocoapods, carthage, interface-builder
Faceaware
An extension that gives UIImageView the ability to focus on faces within an image.
Stars: ✭ 3,004 (+1087.35%)
Mutual labels:  hacktoberfest, cocoapods, carthage
Amplitude Ios
Native iOS/tvOS/macOS SDK
Stars: ✭ 216 (-14.62%)
Mutual labels:  hacktoberfest, cocoapods, carthage
Uitextfield Navigation
🏄‍♂️ UITextField-Navigation makes it easier to navigate between UITextFields and UITextViews
Stars: ✭ 436 (+72.33%)
Mutual labels:  cocoapods, carthage, interface-builder
Loadingshimmer
An easy way to add a shimmering effect to any view with just one line of code. It is useful as an unobtrusive loading indicator.
Stars: ✭ 1,180 (+366.4%)
Mutual labels:  hacktoberfest, cocoapods, carthage
Bow
🏹 Bow is a cross-platform library for Typed Functional Programming in Swift
Stars: ✭ 538 (+112.65%)
Mutual labels:  hacktoberfest, cocoapods, carthage
Tweetextfield
Lightweight set of text fields with nice animation and functionality. 🚀 Inspired by https://uimovement.com/ui/2524/input-field-help/
Stars: ✭ 421 (+66.4%)
Mutual labels:  cocoapods, carthage, interface-builder
Nextgrowingtextview
📝 The next in the generations of 'growing textviews' optimized for iOS 8 and above.
Stars: ✭ 1,540 (+508.7%)
Mutual labels:  hacktoberfest, cocoapods, carthage
Eureka
Elegant iOS form builder in Swift
Stars: ✭ 11,345 (+4384.19%)
Mutual labels:  hacktoberfest, cocoapods, carthage
Aksidemenu
Beautiful iOS side menu library with parallax effect. Written in Swift
Stars: ✭ 216 (-14.62%)
Mutual labels:  cocoapods, carthage
Pincache
Fast, non-deadlocking parallel object cache for iOS, tvOS and OS X
Stars: ✭ 2,513 (+893.28%)
Mutual labels:  cocoapods, carthage
Fusuma
Instagram-like photo browser and a camera feature with a few line of code in Swift.
Stars: ✭ 2,434 (+862.06%)
Mutual labels:  cocoapods, carthage
Theanimation
Type-safe CAAnimation wrapper. It makes preventing to set wrong type values.
Stars: ✭ 214 (-15.42%)
Mutual labels:  cocoapods, carthage
Iso8601
ISO8601 date parser and writer
Stars: ✭ 213 (-15.81%)
Mutual labels:  cocoapods, carthage
Shsearchbar
The search bar that doesn't suck.
Stars: ✭ 206 (-18.58%)
Mutual labels:  cocoapods, carthage
Nef
💊 steroids for Xcode Playgrounds
Stars: ✭ 226 (-10.67%)
Mutual labels:  hacktoberfest, cocoapods
Admozaiccollectionviewlayout
ADMozaicCollectionViewLayout is yet another UICollectionViewLayout subclass that implements "brick", "mozaic" or Pinterest style layout.
Stars: ✭ 226 (-10.67%)
Mutual labels:  cocoapods, carthage
Swiftdailyapi
A Swift API framework for ZhiHu's Daily News.
Stars: ✭ 204 (-19.37%)
Mutual labels:  cocoapods, carthage
Tutti
Tutti is a Swift library that lets you create tutorials, hints and onboarding experiences.
Stars: ✭ 224 (-11.46%)
Mutual labels:  cocoapods, carthage
Sync
JSON to Core Data and back. Swift Core Data Sync.
Stars: ✭ 2,538 (+903.16%)
Mutual labels:  cocoapods, carthage

SimpleCheckbox aims to accomplish what other ios checkbox controls haven't. To be simple. There's no animations, no IBDesignable to slow down interface builder, and no performance heavy draw methods.

🎉 Features

📒 Documentation

⚖️ Carefully tuned default values.

✅ Requirements

  • Xcode 11
  • iOS 10+
  • Swift 5.1

👨‍💻 Installation

Manual

Just drag Checkbox.swift into your project to start using it.

Carthage

  • Add github "BeauNouvelle/SimpleCheckbox" to your Cartfile.

You can learn more about Carthage and get help setting it up here.

Cocoapods

  • Add pod SimpleCheckbox to your pod file.
  • Add import SimpleCheckbox to the top of your files in where you wish to use it.

Swift Package Manager

  • Add https://github.com/BeauNouvelle/SimpleCheckbox.git to your package file.

👩‍🍳 Usage

You can create a new Checkbox either programatically:

let checkbox = Checkbox(frame: CGRect(x: 50, y: 50, width: 25, height: 25))

Or using interface builder by dragging a UIView into your view controller and assigning its class to Checkbox.

After hooking up an outlet you can begin customization.

👩‍🎨 Customization

Border

Border Color

checkbox.checkedBorderColor = .blue
checkbox.uncheckedBorderColor = .black

Border Style

checkbox.borderStyle = .circle
checkbox.borderStyle = .square

Checkmark

Checkmark Color

checkbox.checkmarkColor = .blue

Checkmark Style

checkbox.checkmarkStyle = .circle
checkbox.checkmarkStyle = .square
checkbox.checkmarkStyle = .cross
checkbox.checkmarkStyle = .tick

Haptic Feedback

checkbox.useHapticFeedback = true

Events

There are two methods for detecting when a tap event has occured and the isChecked property has changed.

Add Target

checkbox.addTarget(self, action: #selector(checkboxValueChanged(sender:)), for: .valueChanged)

.......

@objc func checkboxValueChanged(sender: Checkbox) {
    print("checkbox value change: \(sender.isChecked)")
}

Closure

checkbox.valueChanged = { (isChecked) in
    print("checkbox is checked: \(isChecked)")
}

Touch Area

Checkboxs can sometimes appear smaller than their UIButton and UISwitch counterparts which can make them difficult to activate.

SimpleCheckbox has a way for you to tune the touch raduis to extend beyond its frame. Setting increasedTouchRadius will increase the touch radius by that amount.

checkbox.increasedTouchRadius = 5 // Default

🎩 Fancy Alternatives

Objective C — BEMCheckbox

Swift — M13Checkbox

Cocoapods

I'm unable to continue supporting cocoapods with this project as I no longer have access the email account that was registered with this pod. All attempts to contact the cocoapods team to claim SimpleCheckbox pod have been ignored.

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].