Changelog History
Page 4
-
v1.7.5 Changes
π Released on 2018-06-05
β Add
wrapContent()
methods that adjust view's width & height to wrap all its subviewsThe following methods are useful to adjust view's width and/or height to wrap all its subviews. These methods also adjust subviews position to create a tight wrap.
Methods:
wrapContent()
wrapContent(padding: CGFloat)
wrapContent(padding: UIEdgeInsets)
Adjust the view's width and height to wrap all its subviews. The method also adjusts subviews position to create a tight wrap. It is also possible to specify an optional padding around all subviews.wrapContent(:WrapType)
wrapContent(:WrapType, padding: CGFloat)
wrapContent(:WrapType, padding: UIEdgeInsets)
Adjust the view's width AND/OR height to wrap all its subviews. WrapType values are.horizontally
/.vertically
/.all
It is also possible to specify an optional padding around all subviews.
π See documentation for more information
-
v1.7.3 Changes
π Released on 2018-04-25
β Add few missing Objective-C Interface properties and methods
These methods and properties are now accessible from Objective-C:
- π
Pin.layoutDirection
- π
Pin.safeAreaInsetsDidChangeMode
- π
Pin.logWarnings
- π
Pin.initPinLayout()
- π
Pin.layoutDirection()
- π
-
v1.7.2 Changes
π Released on 2018-04-23
π Fine tune UIView.pin.safeArea support for iOS 8 and "New Relic" framework
π Changes:
π On iOS 8, PinLayout compatibility support of UIView.safeAreaInsetsDidChange was causing issues with the device's virtual keyboard. PinLayout still support UIView.pin.safeArea on this iOS release, but UIView.safeAreaInsetsDidChange won't be called on iOS 8
π Fix issue with "New Relic" framework: Add a Pin.initPinLayout() that can be called to initialize PinLayout before the "New Relic" framework is initialized. "New Relic" is conflicting with other popular frameworks including Mixpanel, ReactiveCocoa, Aspect, ..., and PinLayout. To fix the issue,
Pin.initPinLayout()
must be called BEFORE initializing "New Relic" withNewRelic.start(withApplicationToken:"APP_TOKEN")
. See here for more information regarding this issue #130
-
v1.7.0 Changes
π Released on 2018-04-20
β Add macOS support
π PinLayout now support macOS.
π PinLayout support of macOS is not complete at 100%, see here the particularities of the current implementation:
PinLayout support only views that have a parent (superview) using a flipped coordinate system, i.e. views for which the computed property
var isFlipped: Bool
returns true. In a flipped coordinate system, the origin is in the upper-left corner of the view and y-values extend downward. UIKit use this coordinate system. In a non-flipped coordinate system (default mode), the origin is in the lower-left corner of the view and positive y-values extend upward. See Apple's documentation for more information aboutNSView.isFlipped
. The support of non-flipped coordinate system will be added soon.π These methods are currently not supported on macOS, but they will be implemented soon:
sizeToFit(:FitType)
(Coming soon)aspectRatio()
with no parameters (Coming soon)
π
UIView.pin.safeArea
property is not available, AppKit doesn't have an UIView.safeAreaInsets equivalent.
π All other PinLayout's methods and properties are available on macOS!
β Added by Luc Dion in Pull Request #131
PinLayout now use MIT license
The PinLayout license has been changed from BSD 3-clause "New" to MIT License.
-
v1.6.0 Changes
π Released on 2018-03-22
π UIView.pin.safeArea
π PinLayout can handle easily iOS 11 UIView.safeAreaInsets, but it goes further by supporting safeAreaInsets for previous iOS releases (including iOS 7/8/9/10) by adding a property UIView.pin.safeArea. PinLayout also extend the support of UIView.safeAreaInsetsDidChange() callback on iOS 7/8/9/10.
π See UIView.pin.safeArea Documentation for more details.
β Added by Luc Dion in Pull Request #125
β Add methods taking UIEdgeInset as parameter
all(_ insets: UIEdgeInsets)
horizontally(_ insets: UIEdgeInsets)
vertically(_ insets: UIEdgeInsets)
top(_ insets: UIEdgeInsets)
bottom(_ insets: UIEdgeInsets)
left(_ insets: UIEdgeInsets)
right(_ insets: UIEdgeInsets)
See Layout using distances from superviewβs edges for more details.
β Add margins method with percentage parameter
marginTop(_ percent: Percent)
marginLeft(_ percent: Percent)
marginBottom(_ percent: Percent)
marginLeft(_ percent: Percent)
marginStart(_ percent: Percent)
marginEnd(_ percent: Percent)
marginHorizontal(_ percent: Percent)
marginVertical(_ percent: Percent)
margin(_ percent: Percent)
margin(_ vertical: Percent, _ horizontal: Percent)
margin(_ top: Percent, _ horizontal: Percent, _ bottom: Percent)
margin(_ top: Percent, _ left: Percent, _ bottom: Percent, _ right: Percent)
-
v1.5.9 Changes
π Released on 2018-02-18
π
UIView.pin
versusUIView.pinFrame
π Until now
UIView.pin
was used to layout views, but there's also another property calledUIView.pinFrame
that does something slightly different in situations where the view has a transform (UIView.transform
, scaling, rotation, ...).pin
: Set the position and the size of the non-transformed view. The size and position is applied before the transform. This is particularly useful when you want to animate a view using a transform without modifying its layout..pinFrame
: Set the position and the size on the transformed view. The size and position is applied after the transform.
π See https://github.com/layoutBox/PinLayout#uiviews-transforms for more informations.
-
v1.5.7 Changes
π Released on 2018-01-19
π Fix an issue that was affecting UIScrollViews. PinLayout now set only the bounds's size and keep the origin.
β Added by Luc Dion in Pull Request #115β‘οΈ Handle correctly view's
layer.anchorPoint
. PinLayout now update correctly the view position when the view's layer.anchorPoint has been modified, i.e. when it is not its default value (0.5, 0.5). β Added by Luc Dion in Pull Request #114
-
v1.5.5 Changes
π Released on 2018-01-12
β Add methods:
all(_ value: CGFloat)
The value specifies the top, bottom, left and right edges distance from the superview's corresponding edge in pixels. Similar to callingview.top(value).bottom(value).left(value).right(value)
.horizontally(_ value: CGFloat)
/horizontally(_ percent: Percent)
The value specifies the left and right edges on its superview's corresponding edges in pixels (or in percentage of its superview's width).
Similar to callingview.left(value).right(value)
.vertically(_ value: CGFloat)
/vertically(_ percent: Percent)
The value specifies the ** top and bottom edges** on its superview's corresponding edges in pixels (or in percentage of its superview's height).
Similar to callingview.top(value).bottom(value)
.- Added by Olivier Pineau in Pull Request #111