case iOS
Specifies iOS as the preview platform.
case macOS
Specifies macOS as the preview platform.
case tvOS
Specifies tvOS as the preview platform.
case watchOS
Specifies watchOS as the preview platform.
Availability 有効性
Technology
enum PreviewPlatform
Xcode infers the platform for a preview based on the currently selected target. If you have a multiplatform target and want to suggest a particular target for a preview, implement the platform
computed property as a hint, and specify one of the preview platforms:
struct CircleImage_Previews: PreviewProvider {
static var previews: some View {
CircleImage()
}
static var platform: PreviewPlatform? {
PreviewPlatform.tvOS
}
}
case iOS
case macOS
case tvOS
case watchOS
static func == (PreviewPlatform , PreviewPlatform ) -> Bool
static func != (Self, Self) -> Bool
func hash(into: inout Hasher)
var hashValue : Int
protocol PreviewProvider