Merge pull request #3 from Hans92/main Update Unit Tests
Merge pull request #3 from Hans92/main
Update Unit Tests
Example:
import PreviewDevice struct ContentView_Previews: PreviewProvider { static var previews: some View { ContentView() .previewDevice(device: .iphone13, colorSchemes: ColorScheme.allCases) } }
Result
.previewDevice(device: .iphone12)
.previewDevices(device: [.iphone8, .iphone11Pro .iphone12, .iphone12ProMax])
.previewDevice(device: .iphone12, colorScheme: .light)
.previewDevice(device: .iphone12, colorScheme: [.light, .dark])
.previewDevice(device: .iphone12, orientation: .portrait)
.previewDevice(device: .iphone12, orientations: [.portrait, .landscapeLeft, .landscapeRight])
.previewDevice(device: .iphone12, orientation: .portrait, colorSchemes: [.light, .dark])
Specify next line in Podfile:
pod PreviewDevice
Open Xcode, File -> Swift Packages -> Add Packages.. and paste library git url:
https://github.com/Toni77777/PreviewDevice.git
Meet PreviewDevice 0.7.0
What’s new in PreviewDevice 0.8.0
PreviewDevice is released under the MIT license.
©Copyright 2023 CCF 开源发展委员会 Powered by Trustie& IntelliDE 京ICP备13000930号
PreviewDevice
Requirements
Usage
Example:
Result
Preview on device
Preview on devices
Preview on device with color scheme (light, dark)
Preview on device with ColorSchemes
Preview on device with orientation (InterfaceOrientation)
Preview on device with orientations
Preview on device with orientation and color schemes
Installation
CocoaPods
Specify next line in Podfile:
Swift Package Manager
Open Xcode, File -> Swift Packages -> Add Packages.. and paste library git url:
Articles
Meet PreviewDevice 0.7.0
What’s new in PreviewDevice 0.8.0
License
PreviewDevice is released under the MIT license.