From the course: iOS Development Tips

Unlock this course with a free trial

Join today to access over 22,600 courses taught by industry experts.

Use code snippets

Use code snippets

- [Instructor] An often neglected feature of Xcode is code snippets. Code snippets are quick ways to add code you frequently use. In Xcode 10, there's some major changes to code snippets, which might confuse those who use them now. But we'll make them easier to use. Let's take a look at this cool feature for everyone. I'm using a beta four version of Xcode 10 here. And as I'm using betas, be aware changes from what I'm telling you might happen. Download the starter file, which is a table view controller. You can click on ViewController.swift. And get rid of all the other stuff 'cause we're gonna stay right in the view controller here, so you can see everything. I'm not a big fan of the table view controller template. I usually take a blank view controller and type all this in every time, which is the numberOfRowsInSection, cellForRowAt, and indexOath, didSelectRow, and numberOfSections. Snippets can save this code in Xcode every time I need the table view controller code and I can…

Contents