JadenGeller/JGLayoutDotSyntax — pull request #7 by nicolasgomollon (2014-06-22 11:47:37+00:00)
Title: Adapted into Swift

As the title says, I’ve adapted JGLayoutDotSyntax into Swift. The only thing I didn’t have the time to port was the Dynamic Constraints.

A few notable differences you’ll find in this Swift adaptation:
- Added a prefix to the `UIView` extension’s computed properties (e.g. `subview.top` => `subview.layoutTop`) to avoid confusion when dealing with JGLayoutDotSyntax, and to reserve those names for other custom subclasses that may be using them.
- Swift syntax is awesome, so you can now do stuff like `subviewA.layoutTop = subviewB.layoutTop + 20.0` without having to deal with an `add:` method.

Check it out when you have the time. _(If you’re going to merge this Pull Request, you might want to create a new branch for it, since I removed its Objective-C counterparts—I used the branch_ [`swift`](https://github.com/nicolasgomollon/JGLayoutDotSyntax/tree/swift) _in my repo.)_

---

Oh, also, Xcode 6 beta 2 has this thing where it [won’t build a project](https://devforums.apple.com/message/989112) that has extensions with computed properties in a standalone `.swift` file, so [if you want to build and run the code example](http://stackoverflow.com/a/24349373/2469565), you’ll have to COPY => PASTE the computed properties from `UIViewExtension.swift` to the top of `ViewController.swift`. Hopefully that gets fixed in the next beta…