Sending reservations

We need to set up our Collection View so that, when the user taps on a cell, it will add the reservation to the conversation in iMessages. When creating a message to send, we can set the following things:

We will use everything but Trailing Caption and Trailing Subcaption.

  1. Open MessagesViewController in the MessageApp folder in the Navigator panel.
  2. In your main class declaration, add the following method after the setupCollectionView() method in the private extension:
func createMessage(with restaurant:RestaurantItem) {   if let conversation = activeConversation {         let layout = MSMessageTemplateLayout() layout.image = UIImage(named: ...

Get iOS 12 Programming for Beginners - Third Edition 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.