Latest 0.1.0
License MIT
Platforms osx , requires ARC


A subclass of NSButton which looks similar to the UISwitch control in iOS7

alt text


Place a Check Box in your nib and select it. Open Utilities→Identity Inspector (⌥⌘3) and assign NOSwitchButton class.

Or create it in code:

#import "NOSwitchButton.h"

NOSwitchButton *button = [[NOSwitchButton alloc] initWithFrame:NSMakeRect(0,0,60,36)];
[self.window.contentView addSubview:button];


By default, NOSwitchButton uses the same shade of green as UISwitch in iOS7. You can change it with tintColor property:

button.tintColor = [NSColor colorWithCalibratedHue:0.05 saturation:0.86 brightness:0.99 alpha:1];


  • Does not support NSMixedState. An attempt to set allowsMixedState to YES will have no effect.

  • This control does not display neither text value nor custom image.


This project is licensed under the terms of the MIT license.

Latest podspec

    "name": "NOSwitch",
    "version": "0.1.0",
    "summary": "An OSX implementation of UISwitch in iOS7",
    "description": "  A subclass of NSButton (and NSButtonCell) which renders similar to UISwitch control in iOS7.n",
    "homepage": "",
    "screenshots": "",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    "authors": {
        "Yuriy Panfyorov": "[email protected]"
    "platforms": {
        "osx": null
    "source": {
        "git": "",
        "tag": "0.1.0"
    "source_files": [
    "requires_arc": true

Pin It on Pinterest

Share This