All Versions
65
Latest Version
Avg Release Cycle
40 days
Latest Release
-

Changelog History
Page 5

  • v1.5.4 Changes

    ๐Ÿš€ Released on 2017-12-28

    • PinLayout now handle correctly more situations with view with transforms.
  • v1.5.3 Changes

    ๐Ÿš€ Released on 2017-12-28

    • PinLayout now handle correctly parents (superviews) with transforms.
  • v1.5.2 Changes

    ๐Ÿš€ Released on 2017-12-22

    • POSSIBLE BREAKING CHANGE: PinLayout now keeps UIView's transform (scale, rotation, ...)
      Previously any view's transform was altered after layouting the view with PinLayout. Now PinLayout won't affect the view's transforms.

      For people not using transforms, this should be a non-breaking change. If someone is using transforms with PinLayout, this may change the behavior, although I think this will produce the expected results (ie, transforms not being affected/altered by layout).

  • v1.5.1 Changes

    ๐Ÿ”„ Change
    • โž• Add layout() method to support Xcode playgrounds ๐ŸŽ PinLayout layouts views immediately after the line containing .pin has been fully executed, thanks to ARC (Automatic Reference Counting) this works perfectly on iOS/tvOS/macOS simulators and devices. But in Xcode Playgrounds, ARC doesn't work as expected, object references are kept much longer. This is a well-documented issue. The impact of this problem is that PinLayout doesn't layout views at the time and in the order required. To handle this situation in playgrounds it is possible to call the layout() method to complete the layout.

    ๐Ÿ“š See PinLayout in Xcode Playgrounds documentation for more information

  • v1.5.0 Changes

    ๐Ÿ†• New method sizeToFit(:FitType) & fitSize() is now deprecated

    ๐Ÿ”„ Changes
    • BREAKING CHANGE: fitSize() is now deprecated. The new sizeToFit(:FitType) should be used instead.

    • New method sizeToFit(_ fitType: FitType)

      • sizeToFit(_ fitType: FitType)
        The method adjust the view's size based on the view's sizeThatFits() method result. PinLayout will adjust either the view's width or height based on the fitType parameter value.

        Notes:

        • If margin rules apply, margins will be applied when determining the reference dimension (width/height).
        • The resulting size will always respect minWidth / maxWidth / minHeight / maxHeight.

        Parameter fitType: Identify the reference dimension (width / height) that will be used to adjust the view's size.

        • .width: The method adjust the view's size based on the reference width.
          • If properties related to the width have been pinned (e.g: width, left & right, margins, ...), the reference width will be determined by these properties, if not the current view's width will be used.
          • The resulting width will always match the reference width.
        • .height: The method adjust the view's size based on the reference height.
          • If properties related to the height have been pinned (e.g: height, top & bottom, margins, ...), the reference height will be determined by these properties, if not the current view's height will be used.
          • The resulting height will always match the reference height.
        • .widthFlexible: Similar to .width, except that PinLayout won't constrain the resulting width to match the reference width. The resulting width may be smaller of bigger depending on the view's sizeThatFits(..) method result. For example a single line UILabel may returns a smaller width if its string is smaller than the reference width.
        • .heightFlexible: Similar to .height, except that PinLayout won't constrain the resulting height to match the reference height. The resulting height may be smaller of bigger depending on the view's sizeThatFits(..) method result.
      • Added by Luc Dion in Pull Request #103

  • v1.4.3 Changes

    ๐Ÿ›  Fix Carthage support

    • ๐Ÿ›  Fix an issue that occurs with the latest Carthage version.
  • v1.4.2 Changes

    ๐Ÿ”„ Change

    โž• Add method that can pin multiples edges:

    • ๐Ÿ“Œ all(): Pin all edges on its superview's corresponding edges (top, bottom, left, right). Similar to calling view.top().bottom().left().right()

    • ๐Ÿ“Œ horizontally(): Pin the left and right edges on its superview's corresponding edges. Similar to calling view.left().right().

    • vertically(): Pin the top and bottom edges on its superview's corresponding edges. Similar to calling view.top().bottom().

  • v1.4.1 Changes

    ๐Ÿ”„ Change
    • โž• Add new method margin(_ directionalInsets: NSDirectionalEdgeInsets)

      Set margins using NSDirectionalEdgeInsets. This method is particularly to set all margins using iOS 11 UIView.directionalLayoutMargins.

      Available only on iOS 11 and higher.

    • โšก๏ธ Update all examples so they support iOS 11 and iPhoneX landscape mode. They use the new UIView.safeAreaInsets property.

  • v1.4.0 Changes

    ๐Ÿ”„ Change
    • PinLayout now apply correctly margins when hCenter or vCenter have been set

      • hCenter: When the Horizontal Center is set, PinLayout now applies the left margin.
      • vCenter: When the Vertical Center is set, PinLayout now applies the top margin.

      BREAKING CHANGE: This may be a breaking change if you are using hCenter(..), vCenter(...), center(...), centerRight(...), centerLeft(...), or any other method using the center position while also using a margin.

  • v1.3.2 Changes

    ๐Ÿ”„ Change
    • Add aspectRatio methods:

      • aspectRatio(_ ratio: CGFloat):
        Set the view aspect ratio. If a single dimension is set (either width or height), the aspect ratio will be used to compute the other dimension.
        • AspectRatio is defined as the ratio between the width and the height (width / height).
        • An aspect ratio of 2 means the width is twice the size of the height.
        • AspectRatio respects the min (minWidth/minHeight) and the max (maxWidth/maxHeight) dimensions of an item. Set all margins using an UIEdgeInsets. This method is particularly useful to set all margins using iOS 11 UIView.safeAreaInsets
      • aspectRatio(of view: UIView):
        Set the view aspect ratio using another UIView's aspect ratio.

      AspectRatio is applied only if a single dimension (either width or height) can be determined, in that case the aspect ratio will be used to compute the other dimension.

      • AspectRatio is defined as the ratio between the width and the height (width / height).
      • AspectRatio respects the min (minWidth/minHeight) and the max (maxWidth/maxHeight) dimensions of an item.
        • aspectRatio():
          If the layouted view is an UIImageView, this method will set the aspectRatio using the UIImageView's image dimension.

      For other types of views, this method as no impact.