Add availability annotations

This commit is contained in:
Alexandr Goncharov 2020-10-16 14:58:51 +03:00
parent afaf902502
commit f65503ea00
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import SwiftUI
import UIKit
extension UICatalog {
@available(iOS 13, *)
public struct Preview {
init(_ view: AnyView, title: String) {
self.title = title

View File

@ -4,7 +4,7 @@ import SwiftUI
import UIKit
extension UICatalog {
@available(iOS 13, *)
public struct PreviewDescriptor: Identifiable, Hashable {
let builder: () -> AnyView
public let id: String
@ -22,6 +22,7 @@ extension UICatalog {
}
@available(iOS 13, *)
public extension UICatalog.PreviewDescriptor {
init<Content>(_ content: Content.Type,
configuration: UICatalog.PreviewConfiguration = .init(),