FREE TRIAL: Accelerate your app development career with Hacking with Swift+! >>

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

Forums > Books


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 Essential Developer

SPONSORED Join a FREE crash course for iOS devs who want to become complete senior developers — from October 18th to 24th. Learn how to apply iOS app architecture patterns through a series of lectures and practical coding sessions.

Learn more

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.