init
TypeScriptstatic initStringLiteral(value: string): DisplayRepresentationSwift declarationinit(stringLiteral value: String)Creates an instance initialized to the given string value. - Parameter value: The value of the new instance.
struct · iOS 16.0+ · SDK 27.1
struct DisplayRepresentationA type that describes the user interface presentation of a custom type.
static initStringLiteral(value: string): DisplayRepresentationSwift declarationinit(stringLiteral value: String)Creates an instance initialized to the given string value. - Parameter value: The value of the new instance.
get image(): (DisplayRepresentation_Image) | nullSwift declarationvar image: DisplayRepresentation.Image?set image(value: (DisplayRepresentation_Image) | null)Swift declarationvar image: DisplayRepresentation.Image?get title(): _Foundation_LocalizedStringResourceSwift declarationvar title: LocalizedStringResourceset title(value: _Foundation_LocalizedStringResource)Swift declarationvar title: LocalizedStringResourcestatic initTitleSubtitleImageSynonyms(title: _Foundation_LocalizedStringResource, subtitle?: (_Foundation_LocalizedStringResource) | null, image?: (DisplayRepresentation_Image) | null, synonyms?: Array<_Foundation_LocalizedStringResource>): DisplayRepresentationSwift declarationinit(title: LocalizedStringResource, subtitle: LocalizedStringResource? = nil, image: DisplayRepresentation.Image? = nil, synonyms: [LocalizedStringResource] = [])static initTitleSubtitleImage(title: _Foundation_LocalizedStringResource, subtitle?: (_Foundation_LocalizedStringResource) | null, image?: (DisplayRepresentation_Image) | null): DisplayRepresentationSwift declarationinit(title: LocalizedStringResource, subtitle: LocalizedStringResource? = nil, image: DisplayRepresentation.Image? = nil)static initTitleSubtitleSynonymsImage(title: _Foundation_LocalizedStringResource, subtitle: (_Foundation_LocalizedStringResource) | null, synonyms: Array<_Foundation_LocalizedStringResource>, image: (() => Promise<(DisplayRepresentation_Image) | null>)): DisplayRepresentationSwift declarationinit(title: LocalizedStringResource, subtitle: LocalizedStringResource? = nil, synonyms: [LocalizedStringResource] = [], image: @escaping @Sendable () async throws -> DisplayRepresentation.Image?)Creates a display representation whose image is produced lazily by the given closure.
get subtitle(): (_Foundation_LocalizedStringResource) | nullSwift declarationvar subtitle: LocalizedStringResource?set subtitle(value: (_Foundation_LocalizedStringResource) | null)Swift declarationvar subtitle: LocalizedStringResource?get synonyms(): Array<_Foundation_LocalizedStringResource>Swift declarationvar synonyms: [LocalizedStringResource]A list of localized phrases that are synonyms of this particular display representation Example: ``` DisplayRepresentation( name: "Pizza", synonyms: ["Pie", "Za"] ) ``` In this case, "Pie", "Za" and "Pizza" are all ways to display this
set synonyms(value: Array<_Foundation_LocalizedStringResource>)Swift declarationvar synonyms: [LocalizedStringResource]A list of localized phrases that are synonyms of this particular display representation Example: ``` DisplayRepresentation( name: "Pizza", synonyms: ["Pie", "Za"] ) ``` In this case, "Pie", "Za" and "Pizza" are all ways to display this
No declarations were skipped in this snapshot.