Skip to content

Releases: layoutBox/FlexLayout

Integrates Yoga's sources into FlexLayout

23 Feb 20:51
Compare
Choose a tag to compare

That was not my first choice, but Yoga's repository is diverging from our iOS needs.

Reasons:

  • Yoga is now C++ and not C anymore. This was causing issues when built into frameworks.

  • FlexLayout Carthage support was not really great using Yoga's repository. The previous solution was already using a fork of Yoga's repo, but there was some issues while deploying app to the App store (embedding frameworks).

Add margins methods taking percentage parameters

21 Dec 00:12
Compare
Choose a tag to compare

Add margins methods taking percentage parameters:

  • 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)
    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)
    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)
    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)
    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)
    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)
    Set the left, right, start and end margins to the specified value.
  • marginVertical(_ percent: FPercent)
    Set the top and bottom margins to the specified value.
Usage examples:
  view.flex.margin(20%)
  view.flex.marginTop(20%).marginLeft(20%)
  view.flex.marginHorizontal(10%)

Update Carthage support

28 Nov 14:09
Compare
Choose a tag to compare
1.2.1

Update version to 1.2.1

Many properties can now be reset to their initial state

28 Nov 14:10
Compare
Choose a tag to compare
  • 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.

  • Added by Luc Dion in Pull Request #40

AspectRatio can now be reset

23 Nov 17:58
Compare
Choose a tag to compare

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

New margin and padding methods, UICollectionView example, iPhone X examples support

31 Oct 18:45
Compare
Choose a tag to compare
  • 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.
      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.
      This method is particularly useful using iOS 11 UIView.safeAreaInsets
    • 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.

  • Add an example of UICollectionView using FlexLayout

width/height methods taking percentage parameter

18 Oct 01:39
Compare
Choose a tag to compare

Add width/height methods taking percentage parameter
* width(_ percent: FPercent)
* height(_ percent: FPercent)
* minWidth(_ percent: FPercent)
* maxWidth(_ percent: FPercent)
* minHeight(_ percent: FPercent)
* maxHeight(_ percent: FPercent)

Usage examples:

* view.flex.width(50%)
* view.flex.height(25%)

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

Add Carthage support

02 Oct 19:37
Compare
Choose a tag to compare

Add Carthage support

Improved the Align enumeration

25 Aug 00:36
Compare
Choose a tag to compare

Replace the unique Align enumeration by 3 enumerations:

  • AlignContent
  • AlignItems
  • AlignSelf

They all have different options, which make the API cleaner.

Plus:

  • Removed the overflow() method for now.

addContainer() renamed addItem(), markDirty()

24 Aug 12:27
Compare
Choose a tag to compare
  • Add missing markDirty() method
  • ⚠️ BREAKING CHANGE: Renamed the method addContainer() to `addItem(). It is clearer that the added view is in fact a flex item, and not just a flex container.
  • Add an implementation of the Ray Wenderlich Yoga Tutorial
  • Add Swift 4.0 support