Customizing our notifications
Before we can embed an image, we will need a test image. In the Assets
folder of the Navigator panel, create a new group, called Images. Then, in the project folder for this book, open the asset
folder for this chapter and, then, drag the image assets into the Images folder that we've just created.
Embedding images
Next, let's embed our images. First, return to the RestaurantDetailViewController.swift
file, and in the showNotification()
method we created, remove the following code:
let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 5, repeats: false) let identifier = "letsEatReservation" let request = UNNotificationRequest(identifier: identifier, content: content, trigger: trigger) UNUserNotificationCenter.current().add(request, ...
Get iOS 10 Programming for Beginners 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.