DHDeclarable

Declarative UIKit for iOS apps

View the Project on GitHub dan-hart/DHDeclarable

EXTENSION

UIViewController

public extension UIViewController

Properties

inNavigationController

var inNavigationController: UINavigationController

Put this view controller in the rootViewController of a UINavigationController and return it

Methods

toPreview()

func toPreview() -> some View

Example usage:

// MARK: - Preview
import SwiftUI
struct UIViewControllerPreview: PreviewProvider {
   static var previews: some View {
       UIViewController().toPreview()
   }
}