|
7 | 7 |
|
8 | 8 | # Change Log
|
9 | 9 |
|
| 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 | + |
10 | 43 | ## [1.2.1](https://github.com/layoutBox/FlexLayout/releases/tag/1.2.1)
|
11 | 44 | Released on 2017-11-23
|
12 | 45 |
|
|
0 commit comments