@@ -91,18 +91,14 @@ public struct Section {
91
91
footer: footer
92
92
)
93
93
}
94
- }
95
-
96
- #if swift(>=5.1)
97
94
98
- public extension Section {
99
95
/// Create a section wrapping given id and cells with function builder syntax.
100
96
///
101
97
/// - Parameters:
102
98
/// - id: An identifier to be wrapped.
103
99
/// - cells: A closure that constructs cells.
104
100
@inlinable
105
- init < I: Hashable , C: CellsBuildable > ( id: I , @CellsBuilder cells: ( ) -> C ) {
101
+ public init < I: Hashable , C: CellsBuildable > ( id: I , @CellsBuilder cells: ( ) -> C ) {
106
102
self . init (
107
103
id: id,
108
104
cells: cells ( ) . buildCells ( )
@@ -117,7 +113,7 @@ public extension Section {
117
113
/// - footer: A footer component.
118
114
/// - cells: A closure that constructs cells.
119
115
@inlinable
120
- init < I: Hashable , H: Component , F: Component , C: CellsBuildable > ( id: I , header: H ? , footer: F ? , @CellsBuilder cells: ( ) -> C ) {
116
+ public init < I: Hashable , H: Component , F: Component , C: CellsBuildable > ( id: I , header: H ? , footer: F ? , @CellsBuilder cells: ( ) -> C ) {
121
117
self . init (
122
118
id: id,
123
119
header: header. map ( ViewNode . init) ,
@@ -133,7 +129,7 @@ public extension Section {
133
129
/// - header: A header component.
134
130
/// - footer: A footer component.
135
131
@inlinable
136
- init < I: Hashable , H: Component , F: Component > ( id: I , header: H ? , footer: F ? ) {
132
+ public init < I: Hashable , H: Component , F: Component > ( id: I , header: H ? , footer: F ? ) {
137
133
self . init (
138
134
id: id,
139
135
header: header. map ( ViewNode . init) ,
@@ -148,7 +144,7 @@ public extension Section {
148
144
/// - header: A header component.
149
145
/// - cells: A closure that constructs cells.
150
146
@inlinable
151
- init < I: Hashable , H: Component > ( id: I , header: H ? , @CellsBuilder cells: ( ) -> CellsBuildable ) {
147
+ public init < I: Hashable , H: Component > ( id: I , header: H ? , @CellsBuilder cells: ( ) -> CellsBuildable ) {
152
148
self . init (
153
149
id: id,
154
150
header: header. map ( ViewNode . init) ,
@@ -163,7 +159,7 @@ public extension Section {
163
159
/// - footer: A footer component.
164
160
/// - cells: A closure that constructs cells.
165
161
@inlinable
166
- init < I: Hashable , F: Component , C: CellsBuildable > ( id: I , footer: F ? , @CellsBuilder cells: ( ) -> C ) {
162
+ public init < I: Hashable , F: Component , C: CellsBuildable > ( id: I , footer: F ? , @CellsBuilder cells: ( ) -> C ) {
167
163
self . init (
168
164
id: id,
169
165
cells: cells ( ) . buildCells ( ) ,
@@ -177,7 +173,7 @@ public extension Section {
177
173
/// - id: An identifier to be wrapped.
178
174
/// - header: A header component.
179
175
@inlinable
180
- init < I: Hashable , H: Component > ( id: I , header: H ? ) {
176
+ public init < I: Hashable , H: Component > ( id: I , header: H ? ) {
181
177
self . init (
182
178
id: id,
183
179
header: header. map ( ViewNode . init)
@@ -190,16 +186,14 @@ public extension Section {
190
186
/// - id: An identifier to be wrapped.
191
187
/// - footer: A footer component.
192
188
@inlinable
193
- init < I: Hashable , F: Component > ( id: I , footer: F ? ) {
189
+ public init < I: Hashable , F: Component > ( id: I , footer: F ? ) {
194
190
self . init (
195
191
id: id,
196
192
footer: footer. map ( ViewNode . init)
197
193
)
198
194
}
199
195
}
200
196
201
- #endif
202
-
203
197
extension Section : SectionsBuildable {
204
198
/// Build an array of section.
205
199
public func buildSections( ) -> [ Section ] {
0 commit comments