<commit_before>SwiftAutolayout
===============

SwiftAutolayout is a UIView extension to easily create autolayout.


**Initialization**

Bored of writing code like this?

```
let myView = UIView()
myView.setTranslatesAutoresizingMaskIntoConstraints(false)
```

just use this factory method

```
let myView = UIView.newAutoLayoutView()
```

**Centering**

Bored of long code just to center a view in its superview? Just use this convenience method:

```
superview.addConstraints(myView.centerInSuperview())
```

**Pin edges**

Do you want to pin the edges of a view to the edges of the superview?

```
superview.addConstraints(myView.pinEdgesToSuperview())
```

**Sizes**

Do you want to set constraints for width and height?

```
superview.addConstraints(myView.constraintSize(size))
```

Do you want to match the width of a view to the width of another view?

```
superview.addConstraints(myView.matchDimension(.Width, otherView: myOtherView))
```

The complete API
---

```
// MARK: Factory Methods
class func newAutoLayoutView() -> UIView
<commit_msg>README improvements<commit_after>SwiftAutolayout
===============

SwiftAutolayout is a UIView extension to easily create autolayout.
Autolayout is a powerful tool, but it's often very verbose. This extension try to simplify some of the common uses of autolayout with some handy methods.

**Initialization**

There's a factory method to create a `UIView` with `setTranslatesAutoresizingMaskIntoConstraints` already set to `false`.

```
let myView = UIView.newAutoLayoutView()
```

**Centering**

With SwiftAutolayout it's easy to center a view in its superview.

```
superview.addConstraints(myView.centerInSuperview())
```

**Pin edges**

With SwiftAutolayout it's easy to pin view edges to its superview.

```
superview.addConstraints(myView.pinEdgesToSuperview())
superview.addConstraints(myView.pinEdgesToSuperview(20))
```

**Sizes**

With SwiftAutolayout it's easy to create width and height constraints

```
let size = CGSize(10,10)
superview.addConstraints(myView.constraintSize(size))
```

With SwiftAutolayout it's easy to match the width of a view to the width of another view?

```
superview.addConstraints(myView.matchDimension(.Width, otherView: myOtherView))
```

The complete API
---

```
// MARK: Factory Methods
class func newAutoLayoutView() -> UIView

{'fraction_non_alphanumeric': 0.11402753872633391, 'fraction_numerical': 0.0025817555938037868, 'mean_word_length': 5.605113636363637, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2902950', 'n_tokens_mistral': 734, 'n_tokens_neox': 684, 'n_words': 236}