Skip to content

Instantly share code, notes, and snippets.

@pcperini
Created February 8, 2016 17:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcperini/a7a1b85688e63c539d85 to your computer and use it in GitHub Desktop.
Save pcperini/a7a1b85688e63c539d85 to your computer and use it in GitHub Desktop.
class ViewController: UIViewController, ConstraintStateMachineType {
typealias State = Alignment
enum Alignment: String {
case Left = "Left"
case Right = "Right"
}
override func viewDidLoad() {
super.viewDidLoad()
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(UInt64(2) * NSEC_PER_SEC)), dispatch_get_main_queue()) { () -> Void in
self.state = .Right
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment