Skip to content

Commit 98eeb98

Browse files
author
Luc Dion
committed
Update for version 1.2.2
1 parent aff2812 commit 98eeb98

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

CHANGELOG.md

+33
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,39 @@
77

88
# Change Log
99

10+
## [1.2.2](https://github.com/layoutBox/FlexLayout/releases/tag/1.2.2)
11+
Released on 2017-12-20
12+
13+
* Add margins methods taking percentage parameters:
14+
15+
* **`marginTop(_ percent: FPercent)`**
16+
Top margin specify the offset the top edge of the item should have from it’s closest sibling (item) or parent (container).
17+
* **`marginLeft(_ percent: FPercent)`**
18+
Left margin specify the offset the left edge of the item should have from it’s closest sibling (item) or parent (container).
19+
* **`marginBottom(_ percent: FPercent)`**
20+
Bottom margin specify the offset the bottom edge of the item should have from it’s closest sibling (item) or parent (container)
21+
* **`marginRight(_ percent: FPercent)`**
22+
Right margin specify the offset the right edge of the item should have from it’s closest sibling (item) or parent (container).
23+
* **`marginStart(_ percent: FPercent)`**
24+
Set the start margin. In LTR direction, start margin specify the **left** margin. In RTL direction, start margin specify the **right** margin.
25+
* **`marginEnd(_ percent: FPercent)`**
26+
Set the end margin. In LTR direction, end margin specify the **right** margin. In RTL direction, end margin specify the **left** margin.
27+
* **`marginHorizontal(_ percent: FPercent)`**
28+
Set the left, right, start and end margins to the specified value.
29+
* **`marginVertical(_ percent: FPercent)`**
30+
Set the top and bottom margins to the specified value.
31+
32+
###### Usage examples:
33+
```swift
34+
view.flex.margin(20%)
35+
view.flex.marginTop(20%).marginLeft(20%)
36+
view.flex.marginHorizontal(10%)
37+
```
38+
39+
* Added by [Luc Dion](https://github.com/layoutBox) in Pull Request [#49](https://github.com/layoutBox/FlexLayout/pull/49)
40+
41+
42+
1043
## [1.2.1](https://github.com/layoutBox/FlexLayout/releases/tag/1.2.1)
1144
Released on 2017-11-23
1245

FlexLayout.podspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Pod::Spec.new do |s|
33
s.name = "FlexLayout"
4-
s.version = "1.2.1"
4+
s.version = "1.2.2"
55
s.summary = "FlexLayout"
66

77
s.homepage = "https://github.com/lucdion/FlexLayout.git"

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -886,9 +886,9 @@ Right margin specify the offset the right edge of the item should have from it
886886
Set the start margin. In LTR direction, start margin specify the **left** margin. In RTL direction, start margin specify the **right** margin.
887887
* **`marginEnd(_ value: CGFloat)`, `marginEnd(_ percent: FPercent)`**
888888
Set the end margin. In LTR direction, end margin specify the **right** margin. In RTL direction, end margin specify the **left** margin.
889-
* **`marginHorizontal(_ value: CGFloat)`, `marginHorizontal(_ value: CGFloat)`**
889+
* **`marginHorizontal(_ value: CGFloat)`, `marginHorizontal(_ percent: FPercent)`**
890890
Set the left, right, start and end margins to the specified value.
891-
* **`marginVertical(_ value: CGFloat)`, `marginVertical(_ value: CGFloat)`**
891+
* **`marginVertical(_ value: CGFloat)`, `marginVertical(_ percent: FPercent)`**
892892
Set the top and bottom margins to the specified value.
893893
* **`margin(_ insets: UIEdgeInsets)`**
894894
Set all margins using an UIEdgeInsets. This method is particularly useful to set all margins using iOS 11 `UIView.safeAreaInsets`.

0 commit comments

Comments
 (0)