Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge layoutBox/FlexLayout master branch into update_public_headers #1

Merged
merged 10 commits into from
Jun 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: objective-c
osx_image: xcode9.2
osx_image: xcode9.3

cache:
directories:
Expand Down
122 changes: 72 additions & 50 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,81 +7,102 @@

# Change Log

## [1.3.9](https://github.com/layoutBox/FlexLayout/releases/tag/1.3.9)
Released on 2018-05-31

Removed alignItems `.baseline` mode which is not currently supported by Yoga. So we remove it from the list of supported mode until Yoga support it.

* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#94](https://github.com/layoutBox/FlexLayout/pull/94)


## [1.3.8](https://github.com/layoutBox/FlexLayout/releases/tag/1.3.8)
Released on 2018-05-09

Add `display(:Display)` method to set the Yoga's display property.

* Added by [cielpy](https://github.com/cielpy) in Pull Request [#87](https://github.com/layoutBox/FlexLayout/pull/87)

## [1.3.7](https://github.com/layoutBox/FlexLayout/releases/tag/1.3.7)
Released on 2018-05-01

* Upgrade to Swift 4.1
* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#85](https://github.com/layoutBox/FlexLayout/pull/85)
Upgrade to Swift 4.1

* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#85](https://github.com/layoutBox/FlexLayout/pull/85)

## [1.3.6](https://github.com/layoutBox/FlexLayout/releases/tag/1.3.6)
Released on 2018-04-16

* Update the Podspec minimum iOS platform to 8.0
* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#78](https://github.com/layoutBox/FlexLayout/pull/78)
Update the Podspec minimum iOS platform to 8.0

* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#78](https://github.com/layoutBox/FlexLayout/pull/78)

## [1.3.5](https://github.com/layoutBox/FlexLayout/releases/tag/1.3.5)
Released on 2018-03-06

* Add supports for `spaceEvenly` justifyContent mode
* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#66](https://github.com/layoutBox/FlexLayout/pull/66)
Add supports for `spaceEvenly` justifyContent mode

* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#66](https://github.com/layoutBox/FlexLayout/pull/66)

* Flex view's getter is public once again.
* Added by [Alexander Guschin](https://github.com/Rag0n) in Pull Request [#68](https://github.com/layoutBox/FlexLayout/pull/68)
Flex view's getter is public once again.

* Added by [Alexander Guschin](https://github.com/Rag0n) in Pull Request [#68](https://github.com/layoutBox/FlexLayout/pull/68)

## [1.3.4](https://github.com/layoutBox/FlexLayout/releases/tag/1.3.3)
Released on 2018-03-05

* Fix retain cycle
* Now Flex's hosting view is kept using a weak reference.
* Fixed by [Alexey Zinchenko](https://github.com/zintus) in Pull Request [#64](https://github.com/layoutBox/FlexLayout/pull/64)
Fix retain cycle

* Now Flex's hosting view is kept using a weak reference.
* Fixed by [Alexey Zinchenko](https://github.com/zintus) in Pull Request [#64](https://github.com/layoutBox/FlexLayout/pull/64)

## [1.3.3](https://github.com/layoutBox/FlexLayout/releases/tag/1.3.3)
Released on 2018-02-28

* Fix Yoga's rounding issues
* Integer truncation of sizes calculated by sizeThatFits:, and utility functions. Introduced by Obj-C -> Obj-C++ conversion in previous PR
* Low coordinate rounding threshold, which results in flooring apparently valid values. Layout becomes very wrong with absolute coordinate values larger than 100 and having pointScaleFactor set to 3.
* Fixed by [Alexey Zinchenko](https://github.com/zintus) in Pull Request [#63](https://github.com/layoutBox/FlexLayout/pull/63)
Fix Yoga's rounding issues

* Integer truncation of sizes calculated by sizeThatFits:, and utility functions. Introduced by Obj-C -> Obj-C++ conversion in previous PR
* Low coordinate rounding threshold, which results in flooring apparently valid values. Layout becomes very wrong with absolute coordinate values larger than 100 and having pointScaleFactor set to 3.
* Fixed by [Alexey Zinchenko](https://github.com/zintus) in Pull Request [#63](https://github.com/layoutBox/FlexLayout/pull/63)

## [1.3.2](https://github.com/layoutBox/FlexLayout/releases/tag/1.3.2)
Released on 2018-02-27

* Update Yoga core to latest master
* Yoga core updated to facebook/yoga@295d111
* Yoga core tests and their buck configuration added, see core-tests folder
* Add buck tests to CI config
* Added by [Alexey Zinchenko](https://github.com/zintus) in Pull Request [#62](https://github.com/layoutBox/FlexLayout/pull/62)
Update Yoga core to latest master

* Yoga core updated to facebook/yoga@295d111
* Yoga core tests and their buck configuration added, see core-tests folder
* Add buck tests to CI config
* Added by [Alexey Zinchenko](https://github.com/zintus) in Pull Request [#62](https://github.com/layoutBox/FlexLayout/pull/62)


## [1.3.1](https://github.com/layoutBox/FlexLayout/releases/tag/1.3.1)
Released on 2018-02-23

* Integrates Yoga's sources into FlexLayout

* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#61](https://github.com/layoutBox/FlexLayout/pull/61)
Integrates Yoga's sources into FlexLayout

* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#61](https://github.com/layoutBox/FlexLayout/pull/61)


## [1.2.2](https://github.com/layoutBox/FlexLayout/releases/tag/1.2.2)
Released on 2017-12-20

* Add margins methods taking percentage parameters:
Add margins methods taking percentage parameters:

* **`marginTop(_ percent: FPercent)`**
* **`marginTop(_ percent: FPercent)`**
Top margin specify the offset the top edge of the item should have from it’s closest sibling (item) or parent (container).
* **`marginLeft(_ percent: FPercent)`**
* **`marginLeft(_ percent: FPercent)`**
Left margin specify the offset the left edge of the item should have from it’s closest sibling (item) or parent (container).
* **`marginBottom(_ percent: FPercent)`**
* **`marginBottom(_ percent: FPercent)`**
Bottom margin specify the offset the bottom edge of the item should have from it’s closest sibling (item) or parent (container)
* **`marginRight(_ percent: FPercent)`**
* **`marginRight(_ percent: FPercent)`**
Right margin specify the offset the right edge of the item should have from it’s closest sibling (item) or parent (container).
* **`marginStart(_ percent: FPercent)`**
* **`marginStart(_ percent: FPercent)`**
Set the start margin. In LTR direction, start margin specify the **left** margin. In RTL direction, start margin specify the **right** margin.
* **`marginEnd(_ percent: FPercent)`**
* **`marginEnd(_ percent: FPercent)`**
Set the end margin. In LTR direction, end margin specify the **right** margin. In RTL direction, end margin specify the **left** margin.
* **`marginHorizontal(_ percent: FPercent)`**
* **`marginHorizontal(_ percent: FPercent)`**
Set the left, right, start and end margins to the specified value.
* **`marginVertical(_ percent: FPercent)`**
* **`marginVertical(_ percent: FPercent)`**
Set the top and bottom margins to the specified value.

###### Usage examples:
Expand All @@ -98,47 +119,48 @@ Released on 2017-12-20
## [1.2.1](https://github.com/layoutBox/FlexLayout/releases/tag/1.2.1)
Released on 2017-11-23

* Update Carthage support
Update Carthage support


## [1.2.0](https://github.com/layoutBox/FlexLayout/releases/tag/1.2.0)
Released on 2017-11-23

* Many properties can be reset to their initial state. Specifying `nil` when calling these properties reset their value:
* `width(nil)`
* `height(nil)`
* `size(nil)`
* `minWidth(nil)`
* `maxWidth(nil)`
* `minHeight(nil)`
* `maxHeight(nil)`
* `aspectRatio(nil)`
Many properties can be reset to their initial state. Specifying `nil` when calling these properties reset their value:

* `width(nil)`
* `height(nil)`
* `size(nil)`
* `minWidth(nil)`
* `maxWidth(nil)`
* `minHeight(nil)`
* `maxHeight(nil)`
* `aspectRatio(nil)`

* FlexLayout now integrates YogaKit source code, this was needed to improve efficiently the iOS's yoga interface.
FlexLayout now integrates YogaKit source code, this was needed to improve efficiently the iOS's yoga interface.

* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#40](https://github.com/layoutBox/FlexLayout/pull/40)


## [1.1.8](https://github.com/layoutBox/FlexLayout/releases/tag/1.1.8)
Released on 2017-11-23

* AspectRatio can now be reset. Simply call `aspectRatio(nil)`.
AspectRatio can now be reset. Simply call `aspectRatio(nil)`.

* Added by [Luc Dion](https://github.com/lucdion) in Pull Request [#39](https://github.com/layoutBox/FlexLayout/pull/39)

## [1.1.4](https://github.com/layoutBox/FlexLayout/releases/tag/1.1.4)
Released on 2017-10-31

* Add new margin methods:
* `margin(_ insets: UIEdgeInsets)`: Set all margins using UIEdgeInsets.
Add new margin methods:
* `margin(_ insets: UIEdgeInsets)`: Set all margins using UIEdgeInsets.
This method is particularly useful to set all margins using iOS 11 `UIView.safeAreaInsets`
* `margin(_ directionalInsets: NSDirectionalEdgeInsets)`: Set margins using NSDirectionalEdgeInsets.
* `margin(_ directionalInsets: NSDirectionalEdgeInsets)`: Set margins using NSDirectionalEdgeInsets.
This method is particularly to set all margins using iOS 11 `UIView.directionalLayoutMargins`

* Add new padding methods:
* `padding(_ insets: UIEdgeInsets)`: Set all paddings using UIEdgeInsets.
Add new padding methods:
* `padding(_ insets: UIEdgeInsets)`: Set all paddings using UIEdgeInsets.
This method is particularly useful using iOS 11 `UIView.safeAreaInsets`
* `padding(_ directionalInsets: NSDirectionalEdgeInsets)`: Set paddings using NSDirectionalEdgeInsets.
* `padding(_ directionalInsets: NSDirectionalEdgeInsets)`: Set paddings using NSDirectionalEdgeInsets.
This method is particularly useful to set all paddings using iOS 11 `UIView.directionalLayoutMargins`

* Update all examples to support iPhone X landscape orientation.
Expand Down
6 changes: 4 additions & 2 deletions Example/FlexLayoutSample.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
};
Expand Down Expand Up @@ -626,6 +627,7 @@
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand All @@ -641,7 +643,7 @@
INFOPLIST_FILE = "FlexLayoutSample/Supporting Files/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = com.lucdion.FlexLayoutSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
};
name = Debug;
Expand All @@ -655,7 +657,7 @@
INFOPLIST_FILE = "FlexLayoutSample/Supporting Files/Info.plist";
PRODUCT_BUNDLE_IDENTIFIER = com.lucdion.FlexLayoutSample;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
};
name = Release;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@
"scale" : "2x"
},
{
"idiom" : "ios-marketing",
"size" : "1024x1024",
"idiom" : "ios-marketing",
"filename" : "iTunesArtwork@2x.png",
"scale" : "1x"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion FlexLayout.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Pod::Spec.new do |spec|
spec.name = "FlexLayout"
spec.version = "1.3.7"
spec.version = "1.3.9"
spec.summary = "FlexLayout"
spec.homepage = "https://github.com/lucdion/FlexLayout.git"
spec.license = "MIT license"
Expand Down
10 changes: 6 additions & 4 deletions FlexLayout.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = "DEBUG XCODE_PROJECT_BUILD";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VERSIONING_SYSTEM = "apple-generic";
Expand Down Expand Up @@ -576,6 +577,7 @@
SDKROOT = iphoneos;
SWIFT_ACTIVE_COMPILATION_CONDITIONS = XCODE_PROJECT_BUILD;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
TARGETED_DEVICE_FAMILY = "1,2";
VALIDATE_PRODUCT = YES;
Expand Down Expand Up @@ -609,7 +611,7 @@
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
};
name = Debug;
Expand Down Expand Up @@ -638,7 +640,7 @@
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
SWIFT_OBJC_BRIDGING_HEADER = "";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
};
name = Release;
Expand All @@ -653,7 +655,7 @@
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = com.lucdion.FlexLayoutTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
};
name = Debug;
Expand All @@ -668,7 +670,7 @@
OTHER_LDFLAGS = "$(inherited)";
PRODUCT_BUNDLE_IDENTIFIER = com.lucdion.FlexLayoutTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_SWIFT3_OBJC_INFERENCE = On;
SWIFT_SWIFT3_OBJC_INFERENCE = Off;
SWIFT_VERSION = 4.0;
};
name = Release;
Expand Down
35 changes: 15 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ Flexbox is an incredible improvement over UIStackView. It is simpler to use, muc
* [Aspect Ratio](#aspect_ratio)
* [Margins](#margins)
* [Paddings](#paddings)
* [Borders](#borders)
* [API Documentation](#api_documentation)
* [Examples App](#examples_app)
* [FAQ](#faq)
Expand Down Expand Up @@ -516,7 +515,7 @@ The `justifyContent` property defines the alignment along the main-axis of the c

### alignItems()
- Applies to: `flex containers`
- Values: `stretch` / `start` / `end` / `center` / `baseline`
- Values: `stretch` / `start` / `end` / `center`
- Default value: `stretch `
- CSS name: `align-items`

Expand All @@ -532,7 +531,9 @@ The `alignItems` property defines how flex items are laid out along the cross ax
| **start** | <img src="docs_markdown/images/flexlayout-align-column-flexStart.png" width="140"/>| <img src="docs_markdown/images/flexlayout-align-row-flexStart.png" width="160"/>|
| **end** | <img src="docs_markdown/images/flexlayout-align-column-flexEnd.png" width="140"/>| <img src="docs_markdown/images/flexlayout-align-row-flexEnd.png" width="160"/>|
| **center** | <img src="docs_markdown/images/flexlayout-align-column-center.png" width="140"/>| <img src="docs_markdown/images/flexlayout-align-row-center.png" width="160"/>|
| **baseline** | | <img src="docs_markdown/images/flexlayout-align-row-baseline.png" width="160"/>|

NOTE: alignItems `.baseline` is not currently supported by FlexLayout/Yoga.


<br/>

Expand Down Expand Up @@ -693,6 +694,17 @@ FlexLayout automatically includes the UIView when:

<br>

### display
- Applies to: `flex items`

**Method:**

* **`display(_: Display)`**

Set the item display or not, with `none` value, the item will be hidden and not included in the layout.

<br>

### markDirty()
- Applies to: `flex items`

Expand Down Expand Up @@ -968,23 +980,6 @@ Set all paddings using an NSDirectionalEdgeInsets. This method is particularly u

<br>

<a name="borders"></a>
## 8. Borders
Border behaves nearly identically to Padding and is only separate from Padding to make it easier to implement border effect such as color.

**Methods:**

* `borderLeft(_ value: CGFloat)`
* `borderTop(_ value: CGFloat)`
* `borderRight(_ value: CGFloat)`
* `borderBottom(_ value: CGFloat)`
* `borderStart(_ value: CGFloat)`
* `borderEnd(_ value: CGFloat)`
* `border(_ value: CGFloat)`

<br>


<a name="uiview_methods"></a>
## 9. Extra UIView methods
FlexLayout also adds methods to set common UIView properties.
Expand Down
Loading