The markdown parsing is broken/disabled for release notes. Sorry about that, I'm chasing the source of a crash that's been bringing this website down for the last couple of days.
This release enables DSL Syntax for shorter and cleaner code.
<table>
<tr><td>Regular syntax</td> <td>DSL syntax</td></tr>
<tr>
<td>
```swift
frameLayout + VStackLayout {
$0 + titleLabel
$0 + subTitleLabel
($0 + 0).flexible()
$0 + button
$0 + HStackLayout {
($0 + messageView).flexible()
($0 + 5)
($0 + iconView).padding(top: 5)
}
}
```
</td>
<td>
```swift
frameLayout + VStackView {
titleLabel
subTitleLabel
FlexibleSpace()
button
HStackView {
StackItem(messageView).flexible()
SpaceItem(5)
StackItem(iconView).padding(top: 4)
}
}
```
</td>
</tr>
</table>
More simplify functions:
Old:
```swift
frameLayout.padding(top: 16, left: 16, bottom: 16, right: 16)
frameLayout.align(vertical: .top, horizontal: .right)
frameLayout + VStackLayout {
messageLayout = ($0 + messageView)
messageLayout.padding(top: 16, left: 16, bottom: 16, right: 16)
}
```
New:
```swift
frameLayout.padding(16)
frameLayout.aligns(.top, .right)
frameLayout + VStackLayout {
($0 + messageView).assign(to: &messageLayout).padding(16)
}
```
Now able to display as skeletonMode:
``` swift
frameLayout.isSkeletonMode(true)
frameLayout.skeletonColor(.lightGray) // able to set skeleton color if you want to
```
- `frameLayout(with: UIView)` should find from all childrens
Chainable syntax
1 year ago
5.3.x:
- minItemSize, maxItemSize, fixedItemSize for StackFrameLayout
- bug fixes
5.4.x - 6.x:
- Chainable syntax
- Supports binding views, lazy binding frame to views
- FLView as default UIView with frameLayout enabled
- Support generic type in `generic` branch
Fixed wrong layout for vertical bottom distribution
Fixed wrong calculation in sizeThatFits for .center and .equal in horizontal mode