SwiftUIPreviewLayouts is a Swift package for generating multiple SwiftUI previews for various device layouts and multitasking modes, specifically for iOS.
- Multiple device types
- Portrait and Landscape layouts
- Multitasking support for iPads
dependencies: [
.package(url: "https://github.com/Matt54/SwiftUIPreviewLayouts.git", from: "1.0.0")
]
import SwiftUI
import SwiftUIPreviewLayouts
struct YourView_Previews: PreviewProvider {
static var previews: some View {
PreviewLayouts() {
YourView()
}
}
}
Pull requests are welcome.
MIT