Next, we need to set up our UI. In our iMessages app, we will have a single screen; in this screen, we will show a list of restaurants using a Collection View. When you tap on the restaurant, you will be able to send a reservation message to someone else. Let's get started:
- In your
MessageApp
project, select yourMainInterface.storyboard
. You will see a single storyboard with a label that saysHello World
:
- Delete the label that says
Hello World
by selecting it in the Outline view and, then, hitting Delete. - Select the Messages View Controller and, then, the Attributes inspector in the Utilities panel and change the status bar under
Simulated Metrics
fromInferred
toNone
. - Next, in the Object library of the Utilities panel, type
collectionview
in the filter and then drag a Collection View into the View Controller in the scene. - With the Collection View selected, select the Pin icon and enter the following values:
- All values under
Add New Constraints
are set to0
Constrain...
- All values under