Created
February 8, 2016 16:58
-
-
Save pcperini/bb178ff2304702a83036 to your computer and use it in GitHub Desktop.
This file contains 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
public extension ConstraintStateMachineType where Self: UIViewController { | |
// MARK: Properties | |
var allConstraints: [NSLayoutConstraint] { | |
return self.view.flatConstraints // helper function, recursively collects constraints | |
// https://gist.github.com/pcperini/5a8ea37e8cbbe904a031 | |
} | |
// MARK: Mutators | |
func setNeedsUpdateConstraints() { | |
self.view.setNeedsUpdateConstraints() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment