Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matt54/swiftuipreviewlayouts
Swift package for easily generating SwiftUI previews across multiple devices and multitasking layouts.
https://github.com/matt54/swiftuipreviewlayouts
Last synced: 3 months ago
JSON representation
Swift package for easily generating SwiftUI previews across multiple devices and multitasking layouts.
- Host: GitHub
- URL: https://github.com/matt54/swiftuipreviewlayouts
- Owner: Matt54
- Created: 2023-09-26T12:54:50.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-15T12:52:06.000Z (7 months ago)
- Last Synced: 2024-06-15T14:07:25.895Z (7 months ago)
- Language: Swift
- Homepage:
- Size: 3.22 MB
- Stars: 6
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# 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](./media/Previews%20Video.gif)
## Features
- Multiple device types
- Portrait and Landscape layouts
- Multitasking support for iPads## Installation
```swift
dependencies: [
.package(url: "https://github.com/Matt54/SwiftUIPreviewLayouts.git", from: "1.0.0")
]
```## Usage
```swift
import SwiftUI
import SwiftUIPreviewLayoutsstruct YourView_Previews: PreviewProvider {
static var previews: some View {
PreviewLayouts() {
YourView()
}
}
}
```## Screenshots
### Portrait
![Portrait](./media/Portrait.png)
### Landscape
![Landscape](./media/Landscape.png)
### Landscape Half Split
![Landscape Half Split](./media/Landscape%20Half%20Split.png)
### Landscape Large Split
![Landscape Large Split](./media/Landscape%20Large%20Split.png)
### Landscape Slide
![Landscape Slide](./media/Landscape%20Slide.png)
### Landscape Small Split
![Landscape Small Split](./media/Landscape%20Small%20Split.png)
### Portrait Large Split
![Portrait Large Split](./media/Portrait%20Large%20Split.png)
### Portrait Slide
![Portrait Slide](./media/Portrait%20Slide.png)
### Portrait Small Split
![Portrait Small Split](./media/Portrait%20Small%20Split.png)
## Contributing
Pull requests are welcome.
## License
MIT