Code snippets for the blog post "Animation killed the CPU star" at http://www.apokrupto.com/blog-1/2016/7/16/qd2osqnhgywx23tqm6qcpwgouufpls
Last active
August 14, 2016 14:21
-
-
Save warren-gavin/a4bd5a25a313c81264c87a863ffcb50b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ViewController: UIViewController { | |
override func viewWillAppear(animated: Bool) { | |
super.viewWillAppear(animated) | |
NSNotificationCenter.defaultCenter().postNotificationName(OBAnimatingViewBehaviour.Action.animate, object: self) | |
} | |
override func viewWillDisappear(animated: Bool) { | |
super.viewWillDisappear(animated) | |
NSNotificationCenter.defaultCenter().postNotificationName(OBAnimatingViewBehaviour.Action.stop, object: self) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment