Skip to content

Swift package for easily generating SwiftUI previews across multiple devices and multitasking layouts.

Notifications You must be signed in to change notification settings

Matt54/SwiftUIPreviewLayouts

Repository files navigation

SwiftUIPreviewLayouts

SwiftUIPreviewLayouts is a Swift package for generating multiple SwiftUI previews for various device layouts and multitasking modes, specifically for iOS.

All Layouts in Action

Features

  • Multiple device types
  • Portrait and Landscape layouts
  • Multitasking support for iPads

Installation

dependencies: [
    .package(url: "https://github.com/Matt54/SwiftUIPreviewLayouts.git", from: "1.0.0")
]

Usage

import SwiftUI
import SwiftUIPreviewLayouts

struct YourView_Previews: PreviewProvider {
    static var previews: some View {
        PreviewLayouts() {
            YourView()
        }
    }
}

Screenshots

Portrait

Portrait

Landscape

Landscape

Landscape Half Split

Landscape Half Split

Landscape Large Split

Landscape Large Split

Landscape Slide

Landscape Slide

Landscape Small Split

Landscape Small Split

Portrait Large Split

Portrait Large Split

Portrait Slide

Portrait Slide

Portrait Small Split

Portrait Small Split

Contributing

Pull requests are welcome.

License

MIT

About

Swift package for easily generating SwiftUI previews across multiple devices and multitasking layouts.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages