Latest 1.4
Homepage https://github.com/Sunnyyoung/SYFlatButton
License MIT
Platforms osx 10.12, requires ARC
Authors

Build Status
License MIT
Platform info

Description

A customized NSButton with modern flat style like bootstrap.

Screenshot

SYFlatButton

Installation

Requirement

macOS 10.12 and above.

Cocoapods

  1. Add pod 'SYFlatButton' to your podfile
  2. Run pod install

Manual

Dragging SYFlatButton.h and SYFlatButton.m to your project.

Usage

Interface Builder

  1. Create a NSButton
  2. Set its Button Style to Square in order to change the button’s height
  3. Set its Button Class to SYFlatButton
  4. Config the styles from the inspector

SYFlatButton

Programmatically

See more customizable style from SYFlatButton.h

SYFlatButton *button = [[SYFlatButton alloc] initWithFrame:CGRectMake(20.0, 20.0, 60.0, 30.0)];
button.title = @"Code";
button.momentary = YES;
button.cornerRadius = 4.0;
button.backgroundNormalColor = [NSColor blueColor];
button.backgroundHighlightColor = [NSColor redColor];
[self.view addSubview:button];

Credit

Inspired by FlatButton.

License

The MIT License.

Latest podspec

{
    "name": "SYFlatButton",
    "version": "1.4",
    "summary": "A customized NSButton with modern flat style like bootstrap.",
    "homepage": "https://github.com/Sunnyyoung/SYFlatButton",
    "license": "MIT",
    "authors": {
        "Sunnyyoung": "https://github.com/Sunnyyoung"
    },
    "platforms": {
        "osx": "10.12"
    },
    "source": {
        "git": "https://github.com/Sunnyyoung/SYFlatButton.git",
        "tag": "1.4"
    },
    "source_files": "SYFlatButton/SYFlatButton/*.{h,m}",
    "requires_arc": true
}

Pin It on Pinterest

Share This