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.
UICollectionLayoutListConfiguration, UIContextualAction, UISwipeActionsConfiguration
#121 #134 #135
some uibutton method
merge #133
`func reset()`を`func resetDeclarativeUIKitLayout()`に修正
UIView.decratativeのresetのデフォルト値がtrueのままだったのでfalseに更新
# JP
declarativeメソッドのresetパラメータのデフォルト値をtrueからfalseに変更しました
これによりdeclarativeメソッドもより簡易的に繋げることができます
before
```
self.declarative {
UIStackView.vertical {
UIlabel()
UIlabel()
}
}.declarative(safeArea: .init(all: false), reset: false) {
//SafeAreaを無視したレイアウトを上から足す
UIButton()
.bottom()
.right()
.offset(x: -16, y: -16)
}
```
after
```
self.declarative {
UIStackView.vertical {
UIlabel()
UIlabel()
}
}.declarative(safeArea: .init(all: false)) {
//SafeAreaを無視したレイアウトを上から足す
UIButton()
.bottom()
.right()
.offset(x: -16, y: -16)
}
```
# EN
Changed the default value of the reset parameter of the declarative method from true to false
This allows declarative methods to be connected in a simpler way.
before
```
self.declarative {
UIStackView.vertical {
UIlabel()
UIlabel()
}
}.declarative(safeArea: .init(all: false), reset: false) {
// Add the layout ignoring the SafeArea from the top
UIButton()
.bottom()
.right()
.offset(x: -16, y: -16)
}
```
after
```
self.declarative {
UIStackView.vertical {
UIlabel()
UIlabel()
}
}.declarative(safeArea: .init(all: false)) {
// Add the layout ignoring the SafeArea from the top
UIButton()
.bottom()
.right()
.offset(x: -16, y: -16)
}
```
declarative UIButton.Configuration
declarative UIBarButtonItem, UIBarItem
applyNavigaitonView method
[sample
](https://github.com/sakiyamaK/DeclarativeUIKit/blob/develop/Documentation/ja/uibarbuttonitem.md#sample)
- declarative UISheetPresentationController
- applyView, applySheetPresentationController method
```swift
UIViewController()
.applyView {
$0.backgroundColor(.white)
}
.declarative {
UIScrollView.vertical {
UIStackView.vertical {
(0...50).compactMap { idx in
UILabel("\(idx)でーす")
.textAlignment(.center)
.contentPriorities(.init(vertical: .required))
.customSpacing(8)
}
}
.padding(insets: .init(vertical: 30))
}
}
.applySheetPresentationController {
$0.detents([.large(), .medium()])
.preferredCornerRadius(16)
.prefersGrabberVisible(true)
.prefersScrollingExpandsWhenScrolledToEdge(false)
.largestUndimmedDetentIdentifier(.large)
}
.present(from: self, animated: true)
```
deperacated imperative method
```swift
UIButton("deprecated imperative").imperative {
let button = $0 as! UIButton
button.titleLabel?.font = UIFont.systemFont(ofSize: 12)
button.titleLabel?.textColor = .green
}
```
Let's use apply
no cast needed
```swift
UIButton("apply").apply {
// no use cast
// let button = $0 as! UIButton
$0.titleLabel?.font = UIFont.systemFont(ofSize: 12)
$0.titleLabel?.textColor = .green
}
```
bugfix UIImageView.tintColor