How to do it...

We will build a simple app based on our previous recipe that used the GitHub API. We will make an app that shows all the public repositories for a given GitHub user, and tapping on one will launch a WebView showing that repository on GitHub.

In the file explorer, click on Main.storyboard; the view you see now is a representation of how the app will look, and is called Interface Builder. At the moment, there is only one blank screen visible, which matches how the app looked when we ran it earlier. This screen represents a View Controller object; as the name suggests, this is an object that controls views.

Cocoa Touch implements the programming design pattern MVC, which stands for Model View Controller; it is a way of structuring ...

Get Swift 4 Programming Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.