Releases: linhay/SectionKit
Releases · linhay/SectionKit
Hello, SwiftUI.
2.2.8
Full Changelog: 2.2.7...2.2.8
2.2.1
Full Changelog: 2.1.0...2.2.1
2.1.2
2.0.48
2.0.34
1. SKCWrapperCell & SKCWrapperReusableView 可以使用下列函数注册复用
func dequeue<V: SKConfigurableView & SKLoadViewProtocol>(at row: Int, for type: V.Type) -> SKCWrapperCell<V>
func dequeue<V: SKConfigurableView & SKLoadViewProtocol>(kind: SKSupplementaryKind, for type: V.Type) -> SKCWrapperReusableView<V>
func register<V: SKConfigurableView & SKLoadViewProtocol>(_ cell: V.Type)
func register<V: SKConfigurableView & SKLoadViewProtocol>(_ view: V.Type, for kind: SKSupplementaryKind)
示例:
register(SectionDividerView.self)
register(SectionDividerView.self, for: .header)
let cell = dequeue(at: row, for: SectionDividerView.self)
let view = dequeue(kind: .header, for: SectionDividerView.self)
2. SKCManager
中新增 publishers
2.1. sectionsPublisher
监听 sections
变更
```swift
manager.publishers.sectionsPublisher
.map(\.isEmpty)
.sink(on: self) { (self, isEmpty) in
if isEmpty {
} else {
}
}.store(in: &cancellables)
```
3. SKCManager
中新增配置项
public struct Configuration {
/// 将 reloadSections 操作替换为 reloadData 操作
public var replaceReloadWithReloadData = true
/// 将 insertSections 操作替换为 reloadData 操作
public var replaceInsertWithReloadData = true
/// 将 deleteSections 操作替换为 reloadData 操作
public var replaceDeleteWithReloadData = true
}
示例:
SKCManager.configuration.replaceInsertWithReloadData = false
SKCManager().configuration.replaceInsertWithReloadData = false
2.0.18
2.0.17
2.0.0-beta.3
2.0.0-beta.2
chore: 添加文档能力