Skip to content

Instantly share code, notes, and snippets.

@gwennguihal
Created February 20, 2019 07:54
Show Gist options
  • Save gwennguihal/4ae40958d3c79ae34cf1be29c177a3c6 to your computer and use it in GitHub Desktop.
Save gwennguihal/4ae40958d3c79ae34cf1be29c177a3c6 to your computer and use it in GitHub Desktop.
public typealias BuilderClosure = (Builder) -> Void
@discardableResult public func reloadSection(_ builderClosure: @escaping BuilderClosure) -> SectionDescriptor {
let builder = Builder(sectionDescriptor: self)
builderClosure(builder)
return reloadSection { cells in
cells = builder.cells
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment