Skip to content

Commit e5187ff

Browse files
author
Luc Dion
committed
Update documentation.
1 parent 8bd4f93 commit e5187ff

File tree

4 files changed

+38
-13
lines changed

4 files changed

+38
-13
lines changed

CHANGELOG.md

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

88
# Change Log
99

10+
## [1.7.0](https://github.com/layoutBox/FlexLayout/releases/tag/1.7.0)
11+
Released on 2018-04-20
12+
13+
### Add macOS support
14+
PinLayout now support macOS.
15+
16+
PinLayout **support of macOS is not complete at 100%**, see here the particularities of the current implementation:
17+
18+
* PinLayout support **only views that have a parent (superview) using a flipped coordinate system**, i.e. views for which the computed property `var isFlipped: Bool` returns true. In a flipped coordinate system, the origin is in the upper-left corner of the view and y-values extend downward. UIKit use this coordinate system. In a non-flipped coordinate system (default mode), the origin is in the lower-left corner of the view and positive y-values extend upward. See [Apple's documentation for more information about `NSView.isFlipped`](https://developer.apple.com/documentation/appkit/nsview/1483532-isflipped). The support of non-flipped coordinate system will be added soon.
19+
20+
* These methods are currently not supported on macOS, but they will be implemented soon:
21+
22+
* `sizeToFit(:FitType)` (Coming soon)
23+
* `aspectRatio()` with no parameters (Coming soon)
24+
25+
* `UIView.pin.safeArea` property is not available, AppKit doesn't have an UIView.safeAreaInsets equivalent.
26+
27+
All other PinLayout's methods and properties are available on macOS!
28+
29+
Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#131](https://github.com/mirego/PinLayout/pull/131)
30+
31+
32+
### PinLayout now use MIT license
33+
The PinLayout license has been changed from **BSD 3-clause "New"** to **MIT License**.
34+
1035
## [1.6.0](https://github.com/layoutBox/FlexLayout/releases/tag/1.6.0)
1136
Released on 2018-03-22
1237

PinLayout.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
Pod::Spec.new do |spec|
1010
spec.name = "PinLayout"
1111
spec.version = "1.7.0"
12-
spec.summary = "Fast Swift UIViews layouting without auto layout. No magic, pure code, full control and blazing fast."
13-
spec.description = "Fast Swift UIViews layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable."
12+
spec.summary = "Fast Swift Views layouting without auto layout. No magic, pure code, full control and blazing fast. [iOS/macOS/tvOS]"
13+
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]"
1414
spec.homepage = "https://mirego.github.io/PinLayout/"
1515
spec.license = "MIT license"
1616
spec.author = { "Luc Dion" => "[email protected]" }

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<a href='https://cocoapods.org/pods/PinLayout'><img src="https://img.shields.io/cocoapods/dt/PinLayout.svg" /></a>
1717
</p>
1818

19-
Extremely Fast views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable.
19+
Extremely Fast views layouting without auto layout. No magic, pure code, full control and blazing fast. Concise syntax, intuitive, readable & chainable.
2020

2121
> "No Auto layout constraints attached"
2222
@@ -27,7 +27,7 @@ Extremely Fast views layouting without auto layout. No magic, pure code, full co
2727
* Swift 3.2+ / Swift 4.0 / Objective-C
2828

2929
### Recent features
30-
* :star: PinLayout now support macOS 10.9+. See [macOS Support](#macos_support) for more information.
30+
* :star: PinLayout now support macOS. See [macOS Support](#macos_support) for more information.
3131

3232
* :star: PinLayout expose the `safeAreaInsets` through [`UIView.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.
3333

@@ -273,9 +273,9 @@ Another shorter possible solution using `all()`:
273273

274274
### PinLayout UIView’s edges
275275

276-
PinLayout adds edges properties to UIViews. These properties are used to reference other view’s edges.
276+
PinLayout adds edges properties to UIView/NSView. These properties are used to reference other view’s edges.
277277

278-
**PinLayout UIView’s edges**:
278+
**PinLayout View’s edges**:
279279

280280
* `UIView.edge.top`
281281
* `UIView.edge.vCenter`
@@ -291,7 +291,7 @@ PinLayout adds edges properties to UIViews. These properties are used to referen
291291

292292
### Layout using edges
293293

294-
PinLayout has methods to attach a UIView's edge (top, left, bottom, right, start or end edge) to another view’s edge.
294+
PinLayout has methods to attach a View's edge (top, left, bottom, right, start or end edge) to another view’s edge.
295295

296296
**Methods:**
297297

@@ -352,11 +352,11 @@ This example center horizontally the view B inside the view A with a top margin
352352
<a name="anchors"></a>
353353
## Anchors
354354

355-
### PinLayout UIView’s anchors
355+
### PinLayout View’s anchors
356356

357-
PinLayout adds anchors properties to UIViews. These properties are used to reference other view’s anchors.
357+
PinLayout adds anchors properties to UIView/NSView. These properties are used to reference other view’s anchors.
358358

359-
**PinLayout UIView’s anchors**:
359+
**PinLayout View’s anchors**:
360360

361361
* `UIView.anchor.topLeft` / `UIView.anchor.topCenter` / `UIView.anchor.topRight`
362362
* `UIView.anchor.topStart` / `UIView.anchor.topEnd`:left_right_arrow:
@@ -620,9 +620,9 @@ This is an equivalent solutions using other methods:
620620
<br/>
621621

622622

623-
### Positioning using only visible relative UIViews
623+
### Positioning using only visible relative Views
624624

625-
All PinLayout's relative methods can accept an array of UIViews (ex: `below(of: [UIView])`). Using these methods its possible to filter the list of relative UIViews before the list is used by PinLayout.
625+
All PinLayout's relative methods can accept an array of Views (ex: `below(of: [UIView])`). Using these methods its possible to filter the list of relative Views before the list is used by PinLayout.
626626

627627
PinLayout has a filter method called `visible` that can be used to layout a view related to only visible views. This can be really useful when some views may be visible or hidden depending on the situation.
628628

docs/PinLayout_principles.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* Concise syntax. Layout most views using a single line.
1818

1919
* Stateless
20-
* PinLayout doesn’t add any stored properties to UIViews. It simply computes the UIView.frame property, one view at a time.
20+
* PinLayout doesn’t add any stored properties to UIView/NSView. It simply computes the view's frame property, one view at a time.
2121
* Since it is stateless, it can be used with any other layout framework without conflicts.
2222
Each view can use the layout system that better suit it (PinLayout, autolayout, flexbox, …)
2323

0 commit comments

Comments
 (0)