Skip to content

Releases: layoutBox/PinLayout

Fix CI Failures and Improve Test Code

Choose a tag to compare

@lucdion lucdion released this 23 Jul 13:01

Added by heoblitz in Pull Request #283

Replace UIScreen.main to get display scale on iOS 13.0 and later

Choose a tag to compare

@lucdion lucdion released this 03 Nov 14:19

UIScree.main will be deprecated in a future version of iOS.

Added by Hyungyu Kim in Pull Request #275

Changed the mininum deployment target to iOS 12 & update dependencies

Choose a tag to compare

@lucdion lucdion released this 20 Mar 14:49
ce929a6
Merge pull request #267 from layoutBox/update_dependencies

Update dependencies + fix min deployment target to iOS 12

Fix Xcode Live Preview

Choose a tag to compare

@lucdion lucdion released this 07 Jun 12:44

Fix an error while using Xcode live preview with PinLayout. An internal class has been renamed.

Added by Luc Dion in Pull Request #251

Renamed property `pin.keyboardMargins` -> `pin.keyboardArea`

Choose a tag to compare

@lucdion lucdion released this 02 Feb 18:04

Renamed property pin.keyboardMargins -> pin.keyboardArea. This new name better represent what UIKit's UIView.keyboardLayoutGuide is

Added by Luc Dion in Pull Request #243

New property `pin.keyboardMargins`

Choose a tag to compare

@lucdion lucdion released this 01 Feb 13:13

New property pin.keyboardMargins

  • UIView.pin.keyboardMargins: property expose directly the value of UIKit UIView.keyboardLayoutGuide. This is really useful when layout adjustment due to the keyboard is required. iOS 15+

Added by baegteun in Pull Request #238

New Objective-C interface

Choose a tag to compare

@lucdion lucdion released this 18 May 19:36

New Objective-C interface

Instead of using verbose Objective-C with all brackets ([ ]):

[[[[[[logo.pinObjc top] left] width:100] aspectRatio] marginWithTop:topLayoutGuide + 10 horizontal:10 bottom:10] layout];

It now use function chaining:

logo.pinObjc.topInsets(safeArea).leftInsets(safeArea).width(100).aspectRatio().margin(margin).layout();

Added by protosse in Pull Request #229

Update to Xcode 12.5

Choose a tag to compare

@lucdion lucdion released this 17 May 12:33
  • Update to Xcode 12.5

Fix an issue with Automatic Sizing

Choose a tag to compare

@lucdion lucdion released this 17 Dec 22:35

Fix an issue with Automatic Sizing

  • Fix autoSizeThatFits wrong calculations. There was a problem with size calculations of inner views while using autoSizeThatFits.

Automatic Sizing

Choose a tag to compare

@lucdion lucdion released this 30 Jun 18:28

Add Automatic Sizing feature

By calling autoSizeThatFits with the given available size and a layout closure, any layouting performed by PinLayout in that closure will be computed without affecting any subview's frame in the view hierarchy. On the other hand, any non PinLayout related code will also be executed. For that reason, it is really important to separate your layout code in it's own function to avoid any side effect during sizing, like setting the scroll view's content size in the above exemple or perhaps assigning itemSize in a collection view layout. That kind of code that depends on the layout should only be executed when layoutSubviews() is called as part of a normal layout pass.

The resulting size also takes into account the margins applied on subviews, even on the bottom and trailing sides. Automatic sizing makes it really easy to write your layout logic once and add proper sizing behavior with virtually no additional effort.

See https://github.com/layoutBox/PinLayout#automatic_sizing for more documentation.
* Added by Antoine Lamy in Pull Request #216