Contents

views

The SwiftUI views that you want to add to the Xcode library.

Declaration

@LibraryContentBuilder var views: [LibraryItem] { get }

Discussion

Xcode adds the LibraryItem instances returned by your implementation of this property to its Views library. The following restrictions apply:

  • You must instantiate the library items inline.

  • If specified, the item’s title, category, and matchingSignature must be static strings and not nil.

  • The item’s visible value, if specified, must be a literal Boolean value.

  • The item’s expression must be an instantiation. That is, it can’t be a reference.