UIKit - Live Preview for UIViewController and UIView

What’s the issue?

Let’s Solve it

1. Remove Storyboard

<key>UISceneStoryboardFile</key>
<string>Main</string>

2. Set Root Window

3. Add Preview to UIVIew and UIViewController Extension

UIViewController Preview Extension

UIView Preview Extension

4. How To Use It?

In UIView Class

In UIViewController Class

Bonus 💰

iOS Developer focusing on Swift — “Learn, that’s how we grow our skill”.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store