Files
GradientLoadingBar/Example/Example/Helper/StoryboardView.swift
T
2022-03-07 21:53:13 +01:00

29 lines
768 B
Swift
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
//
// StoryboardView.swift
// Example
//
// Created by Felix Mau on 02.02.22.
// Copyright © 2022 Felix Mau. All rights reserved.
//
import SwiftUI
struct StoryboardView: UIViewControllerRepresentable {
// MARK: - Public properties
let name: String
// MARK: - Public properties
func makeUIViewController(context _: Context) -> UIViewController {
let storyboard = UIStoryboard(name: name, bundle: nil)
guard let viewController = storyboard.instantiateInitialViewController() else {
fatalError("⚠️ Could not instantiate initial view controller for storyboard with name `\(name)`.")
}
return viewController
}
func updateUIViewController(_: UIViewController, context _: Context) {}
}