Skip to content

Commit 06ff55c

Browse files
committed
Update documentation and version number
1 parent 21e53ef commit 06ff55c

File tree

4 files changed

+25
-5
lines changed

4 files changed

+25
-5
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@
77

88
# Change Log
99

10+
## [1.9.0](https://github.com/layoutBox/PinLayout/releases/tag/1.9.0)
11+
Released on 2019-10-03
12+
13+
#### Automatic Sizing (UIView conly)
14+
15+
* By calling `autoSizeThatFits` with the given available size and a layout closure, any layouting performed by PinLayout in that closure will be computed without affecting any subview's `frame` in the view hierarchy. On the other hand, any non PinLayout related code will also be executed. For that reason, it is really important to separate your layout code in it's own function to avoid any side effect during sizing, like setting the scroll view's content size in the above exemple or perhaps assigning `itemSize` in a collection view layout. That kind of code that depends on the layout should only be executed when `layoutSubviews()` is called as part of a normal layout pass. The resulting size also takes into account the margins applied on subviews, even on the bottom and trailing sides. Automatic sizing makes it really easy to write your layout logic once and add proper sizing behavior with virtually no additional effort. See https://github.com/layoutBox/PinLayout#automatic_sizing for more documentation.
16+
* Added by [Antoine Lamy](https://github.com/antoinelamy) in Pull Request [#216](https://github.com/layoutBox/PinLayout/pull/216)
17+
18+
1019
## [1.8.11](https://github.com/layoutBox/PinLayout/releases/tag/1.8.11)
1120
Released on 2019-10-03
1221

PinLayout.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
Pod::Spec.new do |spec|
1010
spec.name = "PinLayout"
11-
spec.version = "1.8.13"
11+
spec.version = "1.9.0"
1212
spec.summary = "Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast."
1313
spec.description = "Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable. [iOS/macOS/tvOS/CALayer]"
1414
spec.homepage = "https://github.com/layoutBox/PinLayout"

README.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,12 @@ Extremely Fast views layouting without auto layout. No magic, pure code, full co
3838
* Xcode 11 / 10 /9
3939

4040
### Recent changes/features
41+
* :star: Automatic Sizing (UIView conly), See [Automatic sizing](#automatic_sizing)
4142
* :star: Add methods to position a view between two other views. See [Layout between other views](#layout_between).
4243
* :star: Add [`pin.readableMargins` and `pin.layoutMargins`](#safeAreaInsets) properties.
4344
* :star: Add `sizeToFit()` method. See [Adjusting size](#adjusting_size).
4445
* :star: PinLayout can now layout CALayer. See [CALayer Support](#calayer_support) for more information.
45-
* :star: PinLayout is in the Top 10 of Swift Layout frameworks on [Awesome Swift](https://swift.libhunt.com/categories/714-layout)
46-
* :star: PinLayout has moved to the **[layoutBox](https://github.com/layoutBox)** organization.
47-
* :star: Add [`wrapContent()`](#wrapContent) methods that adjust view's width and height to wrap all its subviews.
48-
* :star: PinLayout expose the `safeAreaInsets` through [`pin.safeArea`](#safeAreaInsets), this property support not only iOS 11, but is also backward compatible for earlier iOS releases (7/8/9/10). See [safeAreaInsets support](#safeAreaInsets) for more information.
46+
* :star: PinLayout is #9 in the list of Swift Layout frameworks on [Awesome Swift](https://swift.libhunt.com/categories/714-layout)
4947
* See [Changelog](https://github.com/layoutBox/PinLayout/blob/master/CHANGELOG.md) for all changes.
5048

5149

@@ -1530,6 +1528,14 @@ By calling `autoSizeThatFits` with the given available size and a layout closure
15301528

15311529
The resulting size also takes into account the margins applied on subviews, even on the bottom and trailing sides. Automatic sizing makes it really easy to write your layout logic once and add proper sizing behavior with virtually no additional effort.
15321530

1531+
An Automatic Sizing example is available in the [Examples App](#examples_app).
1532+
1533+
Notes:
1534+
1. Automatic Sizing is currently only available on iOS.
1535+
2. Automatic Sizing is still in beta, so any comments are welcomed.
1536+
1537+
<br/>
1538+
15331539
<a name="uiview_transform"></a>
15341540
## UIView's transforms
15351541

docs/examples.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,8 @@ This example show how fixed size views and expandable views can be layouted usin
120120
<img src="pinlayout_exampleapp_auto_adjusting_size.png" width=180/>
121121

122122

123+
## Automatic Sizing Example
124+
This example show how to use Automatic Sizing (`autoSizeThatFits()`) to compute views size.
125+
[Source code](https://github.com/layoutBox/PinLayout/tree/master/Example/PinLayoutSample/UI/Examples/AutoSizing)
126+
127+
<img src="pinlayout_exampleapp_automatic_sizing.png" width=180/>

0 commit comments

Comments
 (0)