NEW: Start my new Ultimate Portfolio App course with a free Hacking with Swift+ trial! >>

SOLVED: Hacking with macOS, project 1, Ctrl-drag from Table View to Source View Controller doesn't have dataSource

Forums > Books

Hi

I just bought Hacking with macOS and started working on Project 1. I'm finding that there's a lot of changes from Xcode 11 to Xcode 12. Like the keyboard shortcuts have changed. I can figure those out no problem, but I hit a road block. I'm at the step that says Ctrl-drag from Table View to Source View Controller and when you release, choose "dataSource" from the menu that appears. Apparently this has changed in Xcode 12 as that option doesn't exist. The available options are:

  • Action Segue
  • Sheet
  • Popover
  • Custom
  • Show
  • Modal

What should I choose here?

Xcode 12.2 macOS 11.0.1

   

Hmm, it works for me using Xcode 12.2:

HWS macOS Project 1 #1

Are you sure your ViewController is named correctly? If I change the name of my SourceViewController to something else, I get this popup:

HWS macOS Project 1 #2

   

ah thank you! I was dragging to the Source View Controller in the Interface Builder pane thingy instead of the one in the Document Outline. It works the way you showed me. Awesome!!!

This is my first programming language I'm learning at 53, so bound to make newbie mistakes :)

   

Hacking with Swift is sponsored by RevenueCat

SPONSORED Building and maintaining in-app subscription infrastructure is hard. Luckily there's a better way. With RevenueCat, you can implement subscriptions for your app in hours, not months, so you can get back to building your app.

Try it for free

Sponsor Hacking with Swift and reach the world's largest Swift community!

Reply to this topic…

You need to create an account or log in to reply.

All interactions here are governed by our code of conduct.

 
Unknown user

You are not logged in

Log in or create account
 

Link copied to your pasteboard.