Skip to content

Instantly share code, notes, and snippets.

@ren6
Created June 12, 2019 13:19
Show Gist options
  • Save ren6/e7fdaa585869e1ca9b88c7758bce151d to your computer and use it in GitHub Desktop.
Save ren6/e7fdaa585869e1ca9b88c7758bce151d to your computer and use it in GitHub Desktop.
@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
@_functionBuilder public struct ViewBuilder {
/// Builds an empty view from an block containing no statements, `{ }`.
public static func buildBlock() -> EmptyView
/// Passes a single view written as a child view (e..g, `{ Text("Hello") }`) through
/// unmodified.
public static func buildBlock<Content>(_ content: Content) -> Content where Content : View
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment