associatedtype Previews : View
The type to preview.
プレビューすることになる型。
Availability 有効性
Technology
static var previews: Self.Previews { get }
Implement a computed previews
property to indicate the content to preview. Xcode generates a preview for each view that you list. You can apply View
modifiers to the views, like you do when creating a custom view. For a preview, you can also use various preview-specific modifiers that customize the preview. For example, you can choose a specific device for the preview by adding the preview
modifier:
struct CircleImage_Previews: PreviewProvider {
static var previews: some View {
CircleImage()
.previewDevice(PreviewDevice(rawValue: "iPad Pro (11-inch)"))
}
}
For the full list of preview-specific modifiers, see Previews in Xcode.
associatedtype Previews : View