Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialScott Fitsimones
2,609 PointsNew Obj-C class has no template code
When I create, for example, a new subclass of UITableViewController, no sample code ever loads in the project like it does or Ben and Amit in the videos.
1 Answer
Stone Preston
42,016 Pointswhat version of Xcode are you using and what version are they using? it should come with some code (some imports, the class name, the subclass etc) but it might not have all the methods automatically depending on your version. some methods that automagically get generated for amit or ben you might have to implement yourself because of version differences if the video is bit older.
For example some of the tableView delegate methods like cellForForAtIndexPath you might have to add to your view controller yourself. just start typing the method signature and then select the appropriate method name from the auto complete box in xcode.
if you need to implement cellForRowAtIndexpath then start typing -(UITableViewCell *)tableView
and then select the method you need from autocomplete which is - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath