Reputation: 249
I'm trying to develop a tabbed activity app in xcode 8.21, and it only starts you out with two tabs. I want to make a third tab. I followed an online tutorial by adding another view controller and linking it to the tab bar controller. However, it doesn't automatically create a ViewController.swift file. All the tutorials are out of date (already), so I tried manually creating a .swift file called ThirdViewController.swift. Then, in the custom class section of the view controller, I tried typing ThirdViewController but it didn't work. Please help, I don't know what I'm doing wrong. Every tutorial I've seen online is already outdated.
Upvotes: 1
Views: 3192
Reputation: 668
You chose the wrong path to generate your file. In Xcode select "Cocoa Touch Class" instead of "Swift File" you can then decide if you want a Swift or Objective-C file with a specific Class (UIViewController in this case)
Upvotes: 1