4. BY CODE
A lot of boilerplate code
heterogeneous API
let gradient = CAGradientLayer()
gradient.frame = view.bounds
gradient.colors = [UIColor.blueColor(), UIColor.greenColor()]
view.layer.insertSublayer(gradient, atIndex: 0)
btn.tintColor = UIColor.blueColor()
// VS
navigationBar.barTintColor = UIColor.blueColor()
6. CSS, REACTJS, CSS MODULES
Uniformed API for views (CSS)
Naming (CSS)
No complex selectors (CSS modules, ReactJS)
Explicit dependencies (CSS modules, ReactJS)
7. SIMPLE SYNTAX
import Gaikan
var title: Style = [
.Color: UIColor.whiteColor(),
.Font: UIFont.titleFont()
]
myLabel.styleClass = title
8. EXTENSIBLE
It is just about adding new properties
// As of 0.5.0
public enum Property {
case Background
case Border
case Clip
case Color
case CornerRadius
case Font
case Opacity
case TextAlign
case TextShadow
case TintColor
case Transform
case Visible
}