Skip to content
This repository was archived by the owner on Sep 15, 2019. It is now read-only.

Commit 48e93f2

Browse files
author
Satinder Singh
committed
Updated READ ME to comment Chaining (TODO)
1 parent 53058e1 commit 48e93f2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ button1.snap(trailingView: button2, constant: 8)
7474
```
7575
These buttons are now side by side where button2 is now the trailingView. No longer will developers have to think which trailing constraint should apply to which leading constraint. This keeps the code lean and clean.
7676

77+
<!-- Chaining ability not setup yet. TODO
7778
### Chaining
7879
```swift
7980
let snapManager = view.snap(top: 8, leading: 8, width: 50)
@@ -82,7 +83,7 @@ print(snapManager.top?.constant) # 8.0
8283
print(snapManager.height?.constant) # 0.5
8384
```
8485
Snap calls may also be chained and will continue to return a `SnapManager`.
85-
86+
-->
8687
### Constants
8788
A `SnapConfig ` struct is also available where a developer may list all of their constraint constants beforehand and provide this type to the snap method argument.
8889

@@ -92,7 +93,7 @@ let buttonSnapConfig = button.snap(constants: buttonConstraintConstants)
9293
```
9394

9495
### Debugging
95-
SnapLayout will also print out errors to log if a `snap` was not properly applied. For example, if a view is trying to apply a constraint to its superview but was never added as a subview, a runtime log will appear in console.
96+
SnapLayout will also print out errors to log if a `snap` was not properly applied.
9697

9798
```
9899
SnapLayout Error - No constraint was applied for view: <UIView: 0x7fcb8f4031d0; frame = (0 0; 0 0); layer = <CALayer: 0x608000036320>>

0 commit comments

Comments
 (0)