0

Options Window

How can I connect a label, button, or other element from my Storyboard to my coding file in Xcode 13? When I first loaded Xcode, there was no storyboard file added to my project. I had to add one myself. Then, when I created labels and buttons on the Storyboard, it wouldn't allow me to connect to the coding file the way I used to (clicking Ctrl and dragging the label/button to the code). I feel like I'm missing something simple but I can't find any solutions online. Thanks in advance.

  • `Storyboard` belongs to `UIKit`, `ContentView` belongs to `SwiftUI`, the UI design is not interchangeable by default. – vadian Nov 01 '21 at 19:22
  • Thanks for your reply. Is there something I can do differently to have my Storyboard interact with ContentView? In previous versions of Xcode it was easy to connect labels/buttons from Main.storyboard to ViewController.swift. – Stevepit15 Nov 02 '21 at 00:09
  • If you want to create a UIKit based project, select Storyboard in the Interface popup menu in the options dialog window of a new project. – vadian Nov 02 '21 at 05:12
  • Again, thank you very much for your quick responses. If I could just ask one more question, and I know this should be very simple, but I'm not seeing the Interface popup menu when I start a new project. On the welcome screen I click "Create a new Xcode project". Then it takes me to the "Choose a template for your new project" screen, and I click "App". Then it takes me to "Choose options for your new project" screen where I enter the name of the project but nothing about interface. Then it asks me where I want to save the new project. – Stevepit15 Nov 02 '21 at 18:10
  • Please have a closer look. In the **Options** dialog window the Interface popup is between `Bundle Identifier` and `Language` – vadian Nov 02 '21 at 18:14
  • I've included a screenshot above of what I'm seeing in the Options dialog window. I see the Bundle Identifier but not "Language". – Stevepit15 Nov 02 '21 at 18:25

1 Answers1

0

You have selected a Multiplatform template. This is only supported by SwiftUI.

Select a single platform template (iOS, macOS etc)

vadian
  • 274,689
  • 30
  • 353
  • 361