Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

New files are always empty when creating a new class in Xcode

Tags:

xcode

ios

swift

When creating cocoa touch classes, the new file is always empty:

import Cocoa

class UpcomingEvents: UITableViewController {

}

How can I set up Xcode to allow for everything to populate with the tableView override functions automatically upon creation of file?

like image 988
Sauron Avatar asked Jun 01 '16 00:06

Sauron


1 Answers

You code shows that you created Cocoa classes not Cocoa Touch. When creating file choose enter image description hereiOS and then select Cocoa Touch Classes and create file sub class of UITableViewController. Then you will get as you expected.

like image 177
Muzahid Avatar answered Oct 26 '22 23:10

Muzahid