protocol PreviewProvider
A type that produces view previews in Xcode.
ある型、それはビュープレビューをXcodeにおいて生み出すものです。
enum PreviewPlatform
Platforms that can run the preview.
Technology
When you create a custom View
with SwiftUI, Xcode can display a preview of the view’s content that stays up to date as you make changes to the view’s code. You define a structure that conforms to the Preview
protocol to tell Xcode what to display. Xcode shows the preview in a canvas beside your code.
You can use view modifiers to configure the preview, including a set of preview-specific modifiers, like preview
and preview
. Xcode also reflects changes that you make in the canvas back into your code. For tips on working with the canvas, see the Creating and Combining Views tutorial.
protocol PreviewProvider
enum PreviewPlatform
func previewDisplayName (String?) -> some View
func previewDevice (PreviewDevice ?) -> some View
struct PreviewDevice
func previewLayout (PreviewLayout ) -> some View
enum PreviewLayout
func previewInterfaceOrientation (InterfaceOrientation ) -> some View
struct InterfaceOrientation
func previewContext <C>(C) -> some View
protocol PreviewContext
protocol PreviewContextKey