This part will demonstrate the code of encapsulating SWiftUI PreviewProvider and how it can be used in UIKit.UIViewController.
The init function is encapsulated with ViewControllerProvider the view and @ViewBuilder Or specified Size.
The type of ViewControllerProvider.viewController is AnyView, which means it will act like a previewer for Preview Provider.
ViewControllerRepresentable is a struct complies with Protocol "UIViewControllerRepresentable"
file: ViewControllerPreviewProvider.swift
You can cache the data that UIViewController holds and use them when you need to preview your code.
If you are interesting to know more about relative information, please check out PreviewProvider in UIKit UIView