maxvol / CoreAnimationDSL

Swift DSL for CoreAnimation

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CoreAnimationDSL

Swift DSL for CoreAnimation

Allows hierarchically structured declarations:

let line = UIBezierPath().apply {
    $0.move(to: lowerRightCorner)
    $0.addLine(to: upperLeftCorner)
    $0.addLine(to: lowerLeftCorner)
    $0.addLine(to: center)
}

let shape = CAShapeLayer().apply {
    $0.backgroundColor = UIColor.orange.cgColor
}

let animation = CAAnimation().apply {
    $0.autoreverses = true
}

About

Swift DSL for CoreAnimation

License:MIT License


Languages

Language:Swift 100.0%