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.
- Open MessagesViewController in the MessageApp folder in the Navigator panel.
- 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: ...