SYFlatButton 1.4

SYFlatButton 1.4

测试已测试
语言语言 Obj-CObjective C
许可证 MIT
发布最后发布2017年11月

Sunnyyoung维护。



  • Sunnyyoung

描述

一个定制的NSButton,具有类似bootstrap的现代扁平风格。

屏幕截图

安装

要求

macOS 10.9或更高版本。

手动

SYFlatButton.hSYFlatButton.m拖动到您的项目中。

用法

界面构建器

  1. 创建一个NSButton
  2. 将其按钮样式设为方形以改变按钮的高度
  3. 将其按钮类设为SYFlatButton
  4. 从检查器配置样式

代码式

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];

致谢

灵感来自FlatButton

许可证

MIT许可证