Skip to content

Commit

Permalink
working on more elegant view extension
Browse files Browse the repository at this point in the history
  • Loading branch information
posix88 committed Apr 29, 2020
1 parent 9c81119 commit 7b596a7
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Sources/SafePreviewDevice/ViewExtension.swift
Original file line number Diff line number Diff line change
@@ -0,0 1,18 @@
//
// ViewExtension.swift
// SafePreviewDevice
//
// Created by MUSOLINO Antonino on 29/04/2020.
//

#if canImport(SwiftUI)
import SwiftUI

@available(iOS 13.0, OSX 10.15, tvOS 13.0, watchOS 6.0, *)
public extension View {
func previewDevice(_ device: Devices) -> some View {
return PreviewDevice(device: device)
}
}

#endif

0 comments on commit 7b596a7

Please sign in to comment.