A customized NSButton with modern flat style like bootstrap.
macOS 10.12 and above.
- Add
pod 'SYFlatButton'to your podfile - Run
pod install
Dragging SYFlatButton.h and SYFlatButton.m to your project.
- Create a
NSButton - Set its
Button StyletoSquarein order to change the button's height - Set its
Button ClasstoSYFlatButton - Config the styles from the inspector
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];Inspired by FlatButton.
The MIT License.

