6 Programmatic Views

In this chapter, you will update WorldTrotter to create the view for MapViewController programmatically (Figure 6.1). In doing so, you will learn more about view controllers and how to set up constraints and controls (such as UIButtons) programmatically.

Figure 6.1  WorldTrotter with programmatic views

WorldTrotter with programmatic views

Currently, the view for MapViewController is defined in the storyboard. The first step, then, is to remove this view from the storyboard so you can instead create it programmatically.

In Main.storyboard, select the map view associated with Map View Controller and press Delete (Figure 6.2).

Figure ...

Get iOS Programming: The Big Nerd Ranch Guide 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.