Return Value 戻り値
A preview that uses the given name.
Availability 有効性
Technology
A preview that uses the given name.
value
A name for the preview.
Apply this modifier to a view inside your Preview
implementation to associate a display name with that view’s preview:
struct CircleImage_Previews: PreviewProvider {
static var previews: some View {
CircleImage()
.previewDisplayName("Circle")
}
}
Add a name when you have multiple previews together in the canvas that you need to tell apart. The default value is nil
, in which case Xcode displays a default string.