mirror of
https://github.com/fxm90/GradientLoadingBar.git
synced 2026-06-16 12:24:31 +00:00
29 lines
768 B
Swift
29 lines
768 B
Swift
//
|
||
// 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) {}
|
||
}
|