Created
March 23, 2016 16:29
-
-
Save StuartMorris0/8fa1102d2c7770fc66f6 to your computer and use it in GitHub Desktop.
Get reference to a constraint by filtering through all constraints looking for a specific identifier in Swift
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
let foregroundTopConstraint = self.contentView.constraints.filter{ $0.identifier == "ForegroundViewTop"}.first |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
view.constraints.first { $0.identifier == "name" }