iOS 样式 Gaikan

码农软件 · 软件分类 · 其他(Others) · 2019-07-17 15:59:38

软件介绍

Gaikan 是 Swift 中的一个 DSL 声明 ,提供了强大的样式功能。它是参照 JS 和 CSS 模块中的 CSS 创建出来的。

提供一个 Style 对象来设计 UIView(s)

let myLabelStyle: Style = [  .Color: UIColor.redColor(),  .Border: Border(width: 1, color: UIColor.greenColor()),  .Font: UIFont(name: "Courier", size: 24),        
]/// ORlet myLabelStyle = StyleRule() { (inout style: StyleRule) -> () in
  style.color = UIColor.redColor()
  style.border = Border(width: 1, color: UIColor.greenColor())
  style.font = UIFont(name: "Courier", size: 24)
}self.label.applyStyle(myLabelStyle)

可查看样品来了解如何将 Gaikan 集成到一个项目中。

本文地址:https://codercto.com/soft/d/10340.html

The Hard Thing About Hard Things

The Hard Thing About Hard Things

Ben Horowitz / HarperBusiness / 2014-3-4 / USD 29.99

Ben Horowitz, cofounder of Andreessen Horowitz and one of Silicon Valley's most respected and experienced entrepreneurs, offers essential advice on building and running a startup—practical wisdom for ......一起来看看 《The Hard Thing About Hard Things》 这本书的介绍吧!

UNIX 时间戳转换
UNIX 时间戳转换

UNIX 时间戳转换

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具

HEX HSV 转换工具
HEX HSV 转换工具

HEX HSV 互换工具