GithubHelp home page GithubHelp logo

bemcheckbox's Introduction

BEMCheckBox

Build Status Version License Platform Carthage Compatible

BEMCheckBox is an open source library making it easy to create beautiful, highly customizable, animated checkboxes for iOS.

Table of Contents

Project Details

Learn more about the BEMCheckBox project, licensing, support etc.

Requirements

  • Requires iOS 7 or later. The sample project is optimized for iOS 9.
  • Requires Automatic Reference Counting (ARC).
  • Optimized for ARM64 Architecture.

License

See the License. You are free to make changes and use this in either personal or commercial projects. Attribution is not required, but highly appreciated. A little "Thanks!" (or something to that affect) is always welcome. If you use BEMCheckBox in your app, please let us know!

Support

Gitter chat
Join us on Gitter if you need any help or want to talk about the project.

Sample App

The iOS Sample App included with this project demonstrates one way to correctly setup and use BEMCheckBox. It also offers the possibility to customize the checkbox within the app.

React Native

BEMCheckBox can be used with React Native: React-Native-BEMCheckBox

NativeScript

BEMCheckBox can be used with NativeScript: NativeScript-BEMCheckBox

Xamarin

BEMCheckBox can also be used with Xamarin: XPlugins.iOS.BEMCheckBox

Getting Started

It only takes a few simple steps to install and setup BEMCheckBox to your project.

Installation

Swift Package Manager

Add https://github.com/Boris-Em/BEMCheckBox as a dependency to your Package.swift file or select File -> Swift Packages -> Add Package Dependency... in Xcode.

CocoaPods

The easiest way to install BEMCheckBox is to use CocoaPods. To do so, simply add the following line to your Podfile:

pod 'BEMCheckBox'

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

Run carthage update after adding BEMCheckBox to your Cartfile to build the framework. Drag the built BEMCheckBox.framework into your Xcode project.

Manually

Finally, you can install BEMCheckBox manually. Simply drag and drop the Classes folder into your Xcode project. When you do so, make sure to check the "Copy items into destination group's folder" box.

Setup

Setting up BEMCheckBox to your project couldn't be more simple. It is modeled after UISwitch. In fact, you could just replace instances of UISwitch by BEMCheckBox in your project!
Here are the steps to follow to get everything up and running:

  1. Import "BEMCheckBox.h" to the header of your view controller:
#import "BEMCheckBox.h"
  1. BEMCheckBox can either be initialized programatically (through code) or with Interface Builder (Storyboard file). Use the method that makes the most sense for your project.

Programmatical Initialization
Just add the following code to your implementation (usually in the viewDidLoad method of your View Controller).

BEMCheckBox *myCheckBox = [[BEMCheckBox alloc] initWithFrame:CGRectMake(0, 0, 50, 50)];
[self.view addSubview:myCheckBox];

Interface Builder Initialization
1 - Drag a UIView to your UIViewController.
2 - Change the class of the new UIView to BEMCheckBox.
3 - Select the BEMCheckBox and open the Attributes Inspector. Most of the customizable properties can easily be set from the Attributes Inspector. The Sample App demonstrates this capability.

Documentation

All of the methods and properties available for BEMCheckBox are documented below.

Enabling / Disabling the Checkbox

The on Property

Just like UISwitch, BEMCheckBox provides the boolean property on that allows you to retrieve and set (without animation) a value determining wether the BEMCheckBox object is on or off. Defaults to NO.
Example usage:

self.myCheckBox.on = YES;
setOn:animated:

Just like UISwitch, BEMCheckBox provides an instance method setOn:animated: that sets the state of the checkbox to On or Off, optionally animating the transition.
Example usage:

[self.myCheckBox setOn:YES animated:YES];

Reloading

The instance method reload lets you redraw the entire checkbox, keeping the current on value.
Example usage:

[self.myCheckBox reload]

Group / Radio Button Functionality

BEMCheckBoxes can easily be grouped together to form radio button functionality. This will automatically manage the state of each checkbox in the group, so that only one is selected at a time, and can optionally require that the group has a selection at all times.

self.group = [BEMCheckBoxGroup groupWithCheckBoxes:@[self.checkBox1, self.checkBox2, self.checkBox3]];
self.group.selectedCheckBox = self.checkBox2; // Optionally set which checkbox is pre-selected
self.group.mustHaveSelection = YES; // Define if the group must always have a selection

To see which checkbox is selected in that group, just ask for it:

BEMCheckBox *selection = self.group.selectedCheckBox;

To manually update the selection for a group, just set it:

self.group.selectedCheckBox = self.checkBox1;

Delegate

BEMCheckBox uses a delegate to receive check box events. The delegate object must conform to the BEMCheckBoxDelegate protocol, which is composed of two optional methods:

  • didTapCheckBox:
    Sent to the delegate every time the check box gets tapped, after its properties are updated (on), but before the animations are completed.

  • animationDidStopForCheckBox:
    Sent to the delegate every time the check box finishes being animated.

Customization

BEMCheckBox is exclusively customizable though properties.
The following diagram provides a good overview:

Apparence Properties

lineWidth - CGFloat
The width of the lines of the check mark and box. Defaults to 2.0.

hideBox - BOOL
BOOL to control if the box should be hidden or not. Setting this property to YES will essentially turn the checkbox into a check mark. Defaults to NO.

boxType - BEMBoxType
The type of box to use. See BEMBoxType for possible values. Defaults to BEMBoxTypeCircle.

tintColor - UIColor
The color of the box when the checkbox is Off.

onCheckColor - UIColor
The color of the check mark when it is On.

onFillColor - UIColor
The color of the inside of the box when it is On.

onTintColor - UIColor
The color of the line around the box when it is On.

Animations

animationDuration - CGFloat
The duration in seconds of the animations. Defaults to 0.5.

onAnimationType - BEMAnimationType
The type of animation to use when the checkbox gets checked. Defaults to BEMAnimationTypeStroke. See BEMAnimationType bellow for possible values.

offAnimationType - BEMAnimationType
The type of animation to use when the checkbox gets unchecked. Defaults to BEMAnimationTypeStroke. See BEMAnimationType bellow for possible values.

BEMAnimationType
The possible values for onAnimationType and offAnimationType.

  • BEMAnimationTypeStroke

  • BEMAnimationTypeFill

  • BEMAnimationTypeBounce

  • BEMAnimationTypeFlat

  • BEMAnimationTypeOneStroke

  • BEMAnimationTypeFade

bemcheckbox's People

Contributors

agisboye avatar andrey-krukovskiy avatar boris-em avatar czarny avatar danielgindi avatar gelldur avatar hardikdevios avatar irshadpc avatar morozkin avatar remylivewall avatar signoo avatar vahidvdn avatar vortec4800 avatar wanghengheng avatar zhongwuzw 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  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  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

bemcheckbox's Issues

why build fail?

I have sucessfully imported classes and create a bridge header when i add BEMCheckBox in identity inspector it says build Fail.

Disabled state

Sometimes it's useful to disable a check box not allowing further changes until it's enabled again.

BEMCheckBoxGroup Header

I'm using this with Carthage (not by choice) and it seems like the Framework Carthage generates doesn't have the Group header file. I'm not sure what the issue is, maybe it needs some configuration updates in the Framework's Xcode project?

Podspec update

Current version is 1.3.0, but latest available version on CocoaPods is only 1.2.1

Graphical problem while disabiling after an UIAlertController is shown

Here you can download a video that shows the problem:
https://dl.dropboxusercontent.com/u/8581359/check_box_usage.mp4

Untill I show an UIAlertController, the behavior is correct, but as soon as I show it, the disabled animation brokes.

Here is the didTapCheckBox event:

-(void)didTapCheckBox:(id)sender {
    BEMCheckBox *checkBox = (BEMCheckBox*)sender;

    SpaceTargetInfoV2 *spaceTarget;
    for(SpaceTargetInfoV2 *st in self.spaceTargetListResponse.spaceTargetList) {
        if(st.idSpaceTarget == checkBox.tag) {
            spaceTarget = st;
        }
    }

    // if user wants to unbind check if it was the bind owner
    if(!checkBox.on) {
        if(spaceTarget.idUserBindOwner == [[[NSNumberFormatter alloc] init] numberFromString:[Util getIDUser]]) {
            // call the unbind
        }
        else {
            // alert user he cannot do that op
            UIAlertController * alert = [UIAlertController alertControllerWithTitle:[Util getLangValueForTag:@"geofenceUnbindNotAuthorized"]
                                                                            message:@""
                                                                     preferredStyle: UIAlertControllerStyleAlert];

            UIAlertAction *ok = [UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action){}];
            [alert addAction:ok];

            [self presentViewController:alert animated:YES completion:nil];
            [self.tableView reloadData];
        }
    }
    else {

    }
}

Waiting for your replay.

Thanks in advance,
Samuel

Border gets drawn outside of bounds

Before “complaining” about small bugs I would like to say thanks for the work you have put into this control, it is a pleasure to use and much appreciated!

This is probably related to Clipped border #34 .
When trying to mimic the border width of 3 pixels of a UISwitch the lineWidth property of the BEMCheckBox was set to 1.5. The image below shows the effect with a square BEMCheckBox.

Note also that the height of the BEMCheckBox was set to the same height as the UISwitch, 31 (62 pixels), and yet the BEMCheckBox is drawn larger than the UISwitch. This also occurs with the width.

screen shot 2017-01-31 at 12 05 24 pm

If the code in pathForBox is changed to

path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0.0 + (_lineWidth / 2.0), 0.0 + (_lineWidth / 2.0), self.size - _lineWidth, self.size - _lineWidth) cornerRadius:3.0];
and
CGFloat radius = (self.size / 2.0) - (self.lineWidth / 2.0);
respectivley for BEMBoxTypeSquare and BEMBoxTypeCircle.

this results in the expected behaviour.

screen shot 2017-01-31 at 1 22 41 pm

Improvement

Will you consider to add radioButton option as well in the near future?

Not able to group checkbox groups

Hi,
First of all thanks for this awesome library. I am using this in my application where I have to use it like Checkbox in some cases and radio buttons in some cases. Here when I am trying to group checkboxes that are created in for loop it is not working. Here is my code.

int xVal = 10;
            NSMutableArray *checkBoxArray = [[NSMutableArray alloc] init];
            for (int i=0; i<3; i++) {
                BEMCheckBox *myCheckBox = [[BEMCheckBox alloc] initWithFrame:CGRectMake(xVal, 0, 50, 50)];
                myCheckBox.tag = 100+i;
                myCheckBox.delegate = self;
                [cell addSubview:myCheckBox];
                [checkBoxArray addObject:myCheckBox];
                xVal += 60;
            }
            BEMCheckBoxGroup *boxGroup = [BEMCheckBoxGroup groupWithCheckBoxes:checkBoxArray];
            boxGroup.selectedCheckBox = checkBoxArray[0];
            boxGroup.mustHaveSelection = YES;

Please let me know if this implementation is wrong.

Using this view with another view like image or label

Hi, this BEMCheckBox class is good. But there is one problem, it does not support another view hanging near. I think the most common use of this class would be with some image or text near by. And users sometimes would prefer this view to be somehow highlighted when the checkbox is checked.
Here is a little class that does that with image and your class, may be someone could see it useful
gist link

tags and multiple checkboxes

What is the best scenario for this?

30 checkboxes in 10 tableviewcells, 3 checkboxes in each cell.
each defined with tags (a.tag = 101; b.tag = 201; c.tag = 301;) a,b,c are
every checkbox has a defined value (how can we achieve this ??)
- Example: a.value = @"this is a value"; b.value = [NSDate new]; etc.

Now, i want to get the value tapped on a checkbox when is checked or unchecked (.on event)
and to populate the checkboxes with data coming from a json file (matrix of checks?)

Any good idea on how to approach this?

Thanks.
Chris

Animation is very fast

Hi All,
When I use the didTap() the animation is fast. I want to slow down the check mark tick process. I have set the animation duration ,but still not working

BEMCheckBox object cannot be an outlet in Swift

Hi,

I'm using your library and it's truly awesome, congrats =)

I'm suffering a little issue and perhaps you might help me. I've placed an UIView and changed its class to BEMCheckBox afterwards from Storyboard. Everything is running pretty well, but when I try to make an outlet from the BEMCheckBox object in Storyboard to my View Controller I'm getting the next 2 errors:

'weak' may only be applied to class and class-bound protocol types, not '<<error type>>'
Use of undeclared type 'BEMCheckBox'

This is the outlet:

@IBOutlet weak var taskCheckBox: BEMCheckBox!

I'm using Swift and I had to create a bridge. Any idea of what's happening?

Intialization performance

Currently I am using this library to add a number of checkboxes to a view controller as a visual feedback indicator towards the user. I have a view controller that contains 16 checboxes, which are set up in Storyboard with custom fill-, tint- and onCheck colors.

I noticed it took a long time to present this view controller and started profiling to look into the issue.
screen shot 2016-05-03 at 15 21 37
I then noticed that the custom attributes all make a reload call which is taking alot of time to process.
screen shot 2016-05-03 at 15 21 57

The reload call itself calls setNeedsDisplay and layoutIfNeeded, which will be done 3 times before awakeFromNib is even called in my case. What would be the most approriate solution for this problem? I assume a flag that gets set in awakeFromNib is a bit hacky, perhaps.

I can make some time tomorrow to submit a pull request with a simple fix.

IBDesignable Failed in Swift

HI All,

I have bridge with Swift. Still ,IBDesignable build Failed.
screen shot 2017-11-08 at 7 08 18 am
NO target found containing the source files BEMCheckBox.Make Sure the one files are in the target
Please provide me some input on this

Failed to verify bitcode in BEMCheckBox when using carthage

How can I do about it?

fastlane env

Key Value
OS 10.13.1
Ruby 2.4.0
Bundler? false
Git git version 2.15.0
Installation Source ~/.rbenv/versions/2.4.0/bin/fastlane
Host Mac OS X 10.13.1 (17B48)
Ruby Lib Dir ~/.rbenv/versions/2.4.0/lib
OpenSSL Version OpenSSL 1.0.2l 25 May 2017
Is contained false
Is homebrew false
Is installed via Fabric.app false
Xcode Path /Applications/Xcode.app/Contents/Developer/
Xcode Version 9.1

[09:41:37]: $ /usr/bin/xcrun /Users/username/.rbenv/versions/2.4.0/lib/ruby/gems/2.4.0/gems/fastlane-2.64.1/gym/lib/assets/wrap_xcodebuild/xcbuild-safe.sh -exportArchive -exportOptionsPlist '/var/folders/jl/cwd7f_tn0z10hgzqfmv8xt5r0000gn/T/gym_config20171118-50568-1kapl15.plist' -archivePath /Users/username/Library/Developer/Xcode/Archives/2017-11-18/projectName-Test\ 2017-11-18\ 09.30.47.xcarchive -exportPath '/var/folders/jl/cwd7f_tn0z10hgzqfmv8xt5r0000gn/T/gym_output20171118-50568-1umdqbx'
rbenv detected, removing env variables
rbenv: no such command `shell'

  • xcodebuild -exportArchive -exportOptionsPlist /var/folders/jl/cwd7f_tn0z10hgzqfmv8xt5r0000gn/T/gym_config20171118-50568-1kapl15.plist -archivePath '/Users/username/Library/Developer/Xcode/Archives/2017-11-18/projectName-Test 2017-11-18 09.30.47.xcarchive' -exportPath /var/folders/jl/cwd7f_tn0z10hgzqfmv8xt5r0000gn/T/gym_output20171118-50568-1umdqbx
    2017-11-18 09:41:38.108 xcodebuild[56092:929465] [MT] PluginLoading: Required plug-in compatibility UUID C3998872-68CC-42C2-847C-B44D96AB2691 for plug-in at path '/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XcodeColors.xcplugin' not present in DVTPlugInCompatibilityUUIDs
    2017-11-18 09:41:38.109 xcodebuild[56092:929465] [MT] PluginLoading: Required plug-in compatibility UUID C3998872-68CC-42C2-847C-B44D96AB2691 for plug-in at path '
    /Library/Application Support/Developer/Shared/Xcode/Plug-ins/WakaTime.xcplugin' not present in DVTPlugInCompatibilityUUIDs
    2017-11-18 09:41:38.109 xcodebuild[56092:929465] [MT] PluginLoading: Required plug-in compatibility UUID C3998872-68CC-42C2-847C-B44D96AB2691 for plug-in at path '~/Library/Application Support/Developer/Shared/Xcode/Plug-ins/Alcatraz.xcplugin' not present in DVTPlugInCompatibilityUUIDs
    2017-11-18 09:41:38.274 xcodebuild[56092:929465] [MT] IDEDistribution: -[IDEDistributionLogging _createLoggingBundleAtPath:]: Created bundle at path '/var/folders/jl/cwd7f_tn0z10hgzqfmv8xt5r0000gn/T/projectName_2560-11-18_09-41-38.273.xcdistributionlogs'.
    2017-11-18 09:42:03.422 xcodebuild[56092:929465] [MT] IDEDistribution: Step failed: <IDEDistributionPackagingStep: 0x7fd08a56b030>: Error Domain=IDEFoundationErrorDomain Code=1 "Failed to verify bitcode in BEMCheckBox.framework/BEMCheckBox:
    error: Cannot extract bundle from /var/folders/jl/cwd7f_tn0z10hgzqfmv8xt5r0000gn/T/XcodeDistPipeline.L92/Root/Payload/projectName.app/Frameworks/BEMCheckBox.framework/BEMCheckBox (i386)

" UserInfo={NSLocalizedDescription=Failed to verify bitcode in BEMCheckBox.framework/BEMCheckBox:
error: Cannot extract bundle from /var/folders/jl/cwd7f_tn0z10hgzqfmv8xt5r0000gn/T/XcodeDistPipeline.L92/Root/Payload/projectName.app/Frameworks/BEMCheckBox.framework/BEMCheckBox (i386)

}
error: exportArchive: Failed to verify bitcode in BEMCheckBox.framework/BEMCheckBox:
error: Cannot extract bundle from /var/folders/jl/cwd7f_tn0z10hgzqfmv8xt5r0000gn/T/XcodeDistPipeline.L92/Root/Payload/projectName.app/Frameworks/BEMCheckBox.framework/BEMCheckBox (i386)

Error Domain=IDEFoundationErrorDomain Code=1 "Failed to verify bitcode in BEMCheckBox.framework/BEMCheckBox:
error: Cannot extract bundle from /var/folders/jl/cwd7f_tn0z10hgzqfmv8xt5r0000gn/T/XcodeDistPipeline.L92/Root/Payload/projectName.app/Frameworks/BEMCheckBox.framework/BEMCheckBox (i386)

" UserInfo={NSLocalizedDescription=Failed to verify bitcode in BEMCheckBox.framework/BEMCheckBox:
error: Cannot extract bundle from /var/folders/jl/cwd7f_tn0z10hgzqfmv8xt5r0000gn/T/XcodeDistPipeline.L92/Root/Payload/projectName.app/Frameworks/BEMCheckBox.framework/BEMCheckBox (i386)

}

** EXPORT FAILED **
[09:42:03]: Exit status: 70

Clipped border

It seems, that BEMPathManager doesn't take into account lineWidth, therefore drawings of the box will be clipped at the bottom by container view and drawings of the checkmark will be slightly skewed downwards

Can't able to change State

Hi,

I trying to change state like off and on (toggling). When i set button.on = false, i put log it's return true i don't know how to fix. kindly do need fully , herewith add some codes and screen shot of storyboard .

btn_terms.on = false btn_terms.boxType = .circle btn_terms.onAnimationType = .oneStroke btn_terms.offAnimationType = .fill btn_terms.tintColor = UIColor.lightGray btn_terms.onTintColor = UIColor(hexString: appColor.BGColor) btn_terms.onFillColor = UIColor.clear btn_terms.onCheckColor = UIColor(hexString: appColor.BGColor) btn_terms.animationDuration = 0.5 btn_terms.delegate = self

@IBAction func action_terms(_ sender: BEMCheckBox) { print(sender.on) if sender.on{ sender.setOn(false, animated: true) }else{ sender.setOn(true, animated: true) } }

i tried with delegate also but i'm starting state is on= false when i log its return as true

extension RegisterVC: BEMCheckBoxDelegate { func didTap(_ checkBox: BEMCheckBox) { if checkBox.on{ checkBox.setOn(false, animated: true) }else{ checkBox.setOn(true, animated: true) } } }

screen shot 2017-11-23 at 11 57 55 am

Temporary Variable

Hi All,
If we have checkbox in the tableView. How to retrieve the particular row number or section number. While func didTap(_ checkBox: BEMCheckBox) {} . I can retrieve row number by setting checkBox.tag = rowNumber. There should something name of the checkbox or description.where We can set the row and section number.

Any alternative to when the func didTap(_ checkBox: BEMCheckBox) {} called How to retrieve row number and section number for the table.

Thanks,
Booma

Is there "enabled" property or equivalent?

I want to display the state of the checkbox, but not allow the user to change the state. Doesn't seem to be a property or a way of canceling the action via a delegate.

Podfile

There new changes weren't brought through cocoa pods, maybe theres a need to update the pod file?

Change the TintColor more than once

I need to change the TintColor of the checkbox if the user hasn't checked it, I tried with:
[_pCheckBox setTintColor:[UIColor redColor]];
But the color doesn't change, the checkbox keeps the first color I had set using the setTintColor method.
Am I doing something wrong?

Unwanted little circle at the top left.

So I have a set of checkboxes, and I have grouped them using the available group feature.
After grouping I have started facing this issue whereby there appears a little empty circle at the top left totally unwanted and the default off state of the checkBox never appears.
screen shot 2017-07-07 at 5 27 26 am

Support Tristate

It's a awesome checkbox!
It's will be perfect if support tristate?

Bug with setting colors and animation.

When I tried to change colors with setOnTintColor: and setOnCheckColor: and then change state with setOn:(BOOL)on animated:(BOOL)animated, the check box changed its state without animation.

Issue with IB Designables

I have been playing about with check boxes using storyboards and come across an error I can't seem to fix.

I have created a UIView and set its class to BEMCheckBox. This will load a checkbox up in the simulator perfectly. What then happens is that a red warning appears and the storyboard will no longer update anything you do. The error message is below:

Main.storyboard: error: IB Designables: Failed to render and update auto layout status for ViewController (BYZ-38-t0r): Failed to load designables from path (null)

The app builds and runs as intended, I just can't use the storyboard, currently using Xcode version Version 9.0.1 (9A1004).

Any ideas on a fix?

Edit:
Just to clarify the provided demo project functions as intended, the UIView actually shows the checkbox lines in the storyboard and has no errors! See image provided below, left if the project storyboard, middle is that storyboard in simulator and right is the demo project provided by you guys!

screen shot 2017-10-27 at 14 19 45

Have other marker instead of checkmark

A really great control. Thanks !

Something that could be improved:
A checkmark always implies that something is "OK".

If you have to answer "Is there something wrong ?" the checked box looks as if everything is fine.
I´d sugest to have a property e.g. "markerType" with an option to set it to e.g. "BEMMarkerTypeCheckmark" (default), "BEMMarkerTypeDiagonalCross" etc... with a corresponding symbol.
Optimum solution would be to have this customizable for selected and unselected state so the box would not be empty when deselected.

Any chance this gets implemented by a friendly soul ? ;-)

Using `on` property requires `reload` and loses animation

If the on value is set without calling reload, the entire checkbox disappears. It is actually still tappable, and would re-appear when it is tapped to on.

Then I tried calling reload after changing on value. This time the checkbox won't disappear, but the on/off animation will be gone forever in this checkbox instance.

Assigning Delegate

If this checbox is a property of a UITableViewCell how do you recieve the delegate method of didTapOn? Perhaps i'm doing this wrong, but i've tried to assign the delegate within my custom tableviewcell and within my cellForRowAtIndexPath inside my tableViewController and still that delegate method does not fire when tapping on the checkbox.

swift

cant seem to get it to work with swift, the import in the bridging header is fine but it will not work when i try to instantiate a BEMCheckBox object, anyone got an idea?

Not always showing up in IB

I have 4 checkboxes and for some reason inside of IB, onlyl 2 are showing when all 4 have the same attributes. Latest XCode 9.3

Duplicate issue when use it as a view inside a prototype UITableViewCell

hello,
a strange behavior when i use BEMCheck as a view inside a cell in UITableView!

rendering is very nice, but the problem is: when i check BEM in row no "1", another BEM checked in row No "10" automatically!!! (while i don't implement any action on touch event!)

i'm using Xcode8 with Swift3
note that i put BEMCheckBox inside a prototype UITableViewCell like following:
ViewController -> UITableView -> UITableViewCell -> View (BEMCheckBox)

any suggestion guys?

Regards

OS X version

I've made an OS X version - at first I was using #ifdefs to keep one code between iOS and OS X, but I had a weird Xcode issue that had me junk that.

If you'd like it, let me know and I'll fork it and put it up.

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.