Chap 1: Not able to connect the table view to viewController.swift

I am using Xcode 7.3.1and when I try to connect the table view or the bar button item (Add) I cannot do so.

From past experience I believe that this is due to the fact that a view class has not been set. I have gone over the tutorial very closely and get the same result.

Any help will be appreciated.

When I set the table view controller to Class: ViewController I get the following error:

‘Launch screens may not set custom classnames’

Update:
If I click on the nav controller the Identity Inspector has ‘UINavigationController’ grayed out in the Class pane. Doing the same on the View Controller, the Class pane shows ‘UIViewController’ grayed out. So it appears that all is well in that regard.

So why can’t I connect the objects to the viewController.swift file?

Another clue:
When I run the app on my iPhone the View Controller does not appear as it should. IOW’s the Add button does not appear.

Just a thought - but are you sure you are modifying Main.storyboard there? I seem to remember a similar error when I accidentally started building storyboard stuff in LaunchScreen.storyboard. It’s an easy mistake to make as you scan down the project files and see “storyboard” and of course the interface looks basically the same.

@aeberbach

Could you kindly give me a swift kick in the a$$??

You are absolutely correct - I was working with the LaunchScreen.storyboard and not the Main.storyboard. I’m wondering if I can staple a Post-It sticker to my forehead?? That is such a foolhardy schoolboy mistake.

That said, I cannot thank you enough for providing the correct solution to my blunder. Please don’t tell anyone. Ha!

Thanks for taking your time to set me straight.

Well, I wish I could claim never to have made this mistake myself


Don’t worry. I won’t tell anyone. LOL!

Take care.