---
title: "Discussion on \"Previewing UIViews and UIViewControllers With SwiftUI Preview\" | Hashnode"
description: "Discussion on \"Previewing UIViews and UIViewControllers With SwiftUI Preview\". Steps on how to do it\n1. Create a new Cocoa Touch Class File template as a subclass of UIViewController using Swift language. Name that file as BaseUIViewController\n2. Replace the boilerplate code with this example code snippet\nimport UIKit\nimport Sw..."
url: "https://hashnode.com/posts/previewing-uiviews-and-uiviewcontrollers-with-swiftui-preview/652527f6bd286de1be25803b"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Previewing UIViews and UIViewControllers With SwiftUI Preview](https://conglesolutionx.hashnode.dev/previewing-uiviews-and-uiviewcontrollers-with-swiftui-preview?utm_source=hashnode&utm_medium=feed)

Steps on how to do it 1. Create a new Cocoa Touch Class File template as a subclass of UIViewController using Swift language. Name that file as BaseUIViewController 2. Replace the boilerplate code with this example code snippet import UIKit import Sw...

Oct 10, 2023 · 3 min read · conglesolutionx.hashnode.dev  
Read the article

-   [#swift](https://hashnode.com/tag/swift)
-   [#swiftui](https://hashnode.com/tag/swiftui)

## Written by

[Cong Le](https://hashnode.com/@CongLe)

@CongLe · California, US

  
[View profile](https://hashnode.com/@CongLe)

iOS Mobile Developer @Ally

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
