Skip to content

Commit 5b1b2e4

Browse files
author
Luc Dion
authored
Merge pull request #29 from mirego/update_doc_fix_sample_compilation
Update readme and fix sample compilation
2 parents daab303 + c88a81b commit 5b1b2e4

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

PinLayoutSample/PinLayoutSample/UI/Main/MenuView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class MenuView: UIView {
5656
override func layoutSubviews() {
5757
super.layoutSubviews()
5858

59-
tableView.pin.size(size)
59+
tableView.pin.size(frame.size)
6060
}
6161
}
6262

PinLayoutSample/PinLayoutSample/UI/Tests/PinScrolling/PinScrollingView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ class PinScrollingView: UIView {
103103
super.layoutSubviews()
104104

105105
contentScrollView.pin.topLeft().bottomRight().marginTop(64)
106-
contentScrollView.contentSize = CGSize(width: width, height: height * 2)
106+
contentScrollView.contentSize = CGSize(width: frame.width, height: frame.height * 2)
107107
contentScrollView.contentInset = .zero
108108

109109
aView.pin.top(0).left(0).right(0).height(40).margin(10)

README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ Another possible solution using other PinLayout's methods (more details later):
146146

147147
<br/>
148148

149-
### Layout directly on superview’s edges
149+
### Position view directly on superview’s edges
150150

151151
PinLayout also has shorter version that pins a view’s edge **directly** on its superview's corresponding edge.
152152

@@ -224,7 +224,7 @@ Following methods position the corresponding view anchor on another view’s anc
224224
* `bottomCenter(to anchor: Anchor)`
225225
* `bottomRight(to anchor: Anchor)`
226226

227-
NOTE: These methods can also pin a view’s anchor to another view that is not a direct sibling. It works with any views that have at some point the same ancestor.
227+
:pushpin: These methods can pin a view’s anchor to any other view's anchor, even if don't have the same direct superview! It works with any views that have at some point the same ancestor.
228228

229229
###### Usage examples:
230230
```javascript
@@ -322,6 +322,8 @@ PinLayout has methods to attach a UIView's edge (top, left, bottom or right edge
322322
* `bottom(to edge: VerticalEdge)`
323323
* `right(to: edge: HorizontalEdge)`
324324

325+
:pushpin: These methods can pin a view’s edge to any other view's edge, even if don't have the same direct superview! It works with any views that have at some point the same ancestor.
326+
325327
###### Usage examples:
326328
```javascript
327329
view.pin.left(to: view1.edge.right)
@@ -359,6 +361,8 @@ Position the view left of the specified view. This method is similar to pinning
359361
* `right(of UIView)`
360362
Position the view right of the specified view. This method is similar to pinning the view’s left edge.
361363

364+
:pushpin: These methods can pin a view’s relative to any views, even if don't have the same direct superview! It works with any views that have at some point the same ancestor.
365+
362366
###### Usage examples:
363367
```javascript
364368
view.pin.above(of: view2)

0 commit comments

Comments
 (0)