Skip to content

Commit e3cc00b

Browse files
authored
Merge pull request #7 from daniellangh/function-builder-support-for-expandableitems
Function builder support for expandableitems
2 parents 252c0d3 + d5d0fdb commit e3cc00b

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33
[![Build](https://github.com/jvirus/expandable-collection-view-kit/workflows/Build/badge.svg)]()
44
[![Platform](https://img.shields.io/badge/Platform-iOS_13-yellow.svg)]()
55
[![Platform](https://img.shields.io/badge/Platform-iPadOS_13-darkyellow.svg)]()
6-
[![Language](https://img.shields.io/badge/Language-Swift_5.1-orange.svg)]()
6+
[![Language](https://img.shields.io/badge/Language-Swift_5.3-orange.svg)]()
77
[![SPM](https://img.shields.io/badge/SPM-Supported-red.svg)]()
88
[![License](https://img.shields.io/badge/License-MIT-blue.svg)]()
99

10-
**Last Update: 04/February/2020.**
10+
**Last Update: 18/July/2021.**
1111

1212
![](cover-expandable-view.png)
1313

Sources/ExpandableCollectionViewKit/Utils/ExpandableItems.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public struct ExpandableItems {
1212
var items: [ExpandableItem] = []
1313
}
1414

15-
@_functionBuilder
15+
@resultBuilder
1616
public struct ExpandableItemBuilder {
1717

1818
public static func buildBlock(_ item: ExpandableItem) -> ExpandableItem {
@@ -22,5 +22,9 @@ public struct ExpandableItemBuilder {
2222
public static func buildBlock(_ subitems: ExpandableItem...) -> ExpandableItems {
2323
.init(items: subitems)
2424
}
25+
26+
public static func buildBlock(_ items: ExpandableItems) -> ExpandableItems {
27+
items
28+
}
2529
}
2630

0 commit comments

Comments
 (0)