Home > iOS Development > SSCheckBoxView: A check box UI control for iOS apps

SSCheckBoxView: A check box UI control for iOS apps

SSCheckBoxView is a check box UI control for iOS apps. It provides standard check box functionality with two states (checked and unchecked) and 5 different visual styles.
Here are some instructions on how to use it in your iOS apps:

 

Add SSCheckBoxView to your project

 

Create SSCheckBoxView and display it

  • Create an SSCheckBoxView object by calling the initWithFrame:(CGRect) style:(SSCheckBoxViewStyle) checked:(BOOL) method.
  • Add it to your view by calling the addSubView: method.

 

Observe check box state changes

 

Notes

  • The demo project on GitHub includes a simple example on how to use SSCheckBoxView. Have a look at it if you encounter a problem using SSCheckBoxView in your project.
  • Questions, suggestions, bug-reports, github forks & any other contributions are welcome. Don’t hesitate to contact me at @ardalahmet or via ardalahmet(at)gmail.com.
  • The source code is licensed under the Apache License, Version 2.0. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0

 

Screenshot

SSCheckBoxView Demo

SSCheckBoxView Demo

  1. Hung Nguyen
    April 26th, 2012 at 21:25 | #1

    Great control!!! Is there any way that I can add this to the Interface Builder instead of creating it programmatically?

  2. April 27th, 2012 at 08:53 | #2

    Hi @Hung Nguyen ,
    No, unfortunately not. You should create and add it to your view programmatically.

    Cheers.

  3. JB
    May 15th, 2012 at 01:37 | #3

    Pretty good, thanks. Would be good to include a mechanism to cancel the check/uncheck. I think I have to add this functionality. Send a message to the delegate and cancel the check/uncheck if true is returned.

  4. May 15th, 2012 at 09:58 | #4

    Hi @JB ,

    Thanks for the comment. I added enable/disable checkbox functionality to SSCheckBoxView. You can now use “enabled” property to enable/disable it.

  5. Lammert Westerhoff
    March 14th, 2013 at 14:58 | #5

    It would be nice if the textLabel was a public property to change the text attributes.

  1. June 8th, 2012 at 12:20 | #1
  2. September 20th, 2012 at 10:54 | #2
  3. January 24th, 2013 at 04:16 | #3