Creating a UIKit Xcode Project
A common problem people learning UIKit have when following a tutorial is that what they see in Xcode does not match what the tutorial shows. The tutorial shows a view controller file, but they see a content view file.
The most common cause of this problem is creating an Xcode project that uses SwiftUI instead of UIKit. When you create a new project in Xcode, the default is to create a SwiftUI project.
To create an Xcode project that uses UIKit, you must create an iOS app project and tell Xcode to use a storyboard for the user interface. UIKit uses storyboards, and SwiftUI doesn’t.
Create an iOS App Project
In Xcode choose File > New > Project to create a new project. The New Project Assistant opens.
Click on iOS at the top of the assistant to see the iOS app project templates. Choose either App or Document App. If you’re not sure, choose App. Click the Next button.
Choose Storyboard for the User Interface
When you click the Next button, the New Project Assistant takes you to the next step in creating the project.
Choose Storyboard from the Interface menu to create a UIKIt project.
If you don’t see an Interface menu (or a menu with a similar name), click the Previous button and make sure you choose an iOS app project. Xcode’s multi-platform project templates create SwiftUI projects.