Skip to content

Releases: linhay/SectionKit

Hello, SwiftUI.

21 Nov 06:12
Compare
Choose a tag to compare

2.2.8

24 Sep 06:15
Compare
Choose a tag to compare

Full Changelog: 2.2.7...2.2.8

2.2.1

01 Jul 08:08
Compare
Choose a tag to compare

Full Changelog: 2.1.0...2.2.1

2.1.2

28 Jun 07:16
Compare
Choose a tag to compare

2.0.48

18 Oct 06:45
Compare
Choose a tag to compare

2.0.34

21 Jun 10:35
Compare
Choose a tag to compare

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

17 Jan 02:11
Compare
Choose a tag to compare

2.0.17

16 Jan 07:17
Compare
Choose a tag to compare

2.0.0-beta.3

18 Nov 03:56
Compare
Choose a tag to compare

2.0.0-beta.2

27 Sep 02:02
Compare
Choose a tag to compare
chore: 添加文档能力