In previous versions of XCode you could do New>File>Cocoa Touch Template to create a subclass of UIViewController with the proper imports, viewDidLoad() method and so forth. This seems to be missing from XCode7. When I do New>File, Cocoa Touch Template is missing. I can create a new Cocoa class, but this does not subclass UIViewTemplate. Is there any way to create a view controller class quickly in XCode7?
Go to File -> New -> File
Under the iOS section, select
Cocoa Touch Class. Click next
For the section that says
Subclass of: type in
UIViewController. For the section that says
Class: type in the name of your subclass.
Click next and save the file in the default folder.
If Xcode is not showing
Cocoa Touch Class and showing
Cocoa Touch instead, tap on the iOS section again and
Cocoa Touch Class should appear.