Anchorage icon indicating copy to clipboard operation
Anchorage copied to clipboard

Add a shorthand for accessibilityIdentifier

Open ZevEisenberg opened this issue 6 years ago • 1 comments

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 avatar May 13 '19 19:05 ZevEisenberg

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.

ZevEisenberg avatar May 31 '19 17:05 ZevEisenberg