Rightpoint / Anchorage

A collection of operators and utilities that simplify iOS layout code.
MIT License
627 stars 46 forks source link

Add a shorthand for accessibilityIdentifier #76

Open ZevEisenberg opened 5 years ago

ZevEisenberg commented 5 years ago

It would be nice to be able to take any Anchorage expression and add + "someString" to it, and get a constraint that has an identifier. Constraint identifiers show up in debug logs and the Xcode view debugger, and they also appear on wtfautolayout.com.

I’m guessing that overloading func +(lhs: LayoutExpression, rhs: String) might adversely affect compile times, so I’d be OK with exploring other operators, but it’s hard to beat good ol’ + for readability.

ZevEisenberg commented 5 years ago

It would also be nice to put + AnchorageDebug() at the end of an Anchorage expression and have it capture the file, line number, and function name for debugging purposes.