Now that we have permission, we need to set up notifications. We will start setting up our buttons:
- Open the RestaurantDetailViewController.swift file.
- At the top of the file, under import UIKit, add the following:
import UserNotifications
- Add the following method after our @IBAction func unwindReviewCancel(segue: UIStoryboardSegue) {} method and before the last curly bracket of our class file:
@IBAction func onTimeTapped(sender: UIButton) {}
- Save the file, and you will see an empty circle appear next to this new @IBAction.
- Open the RestaurantDetail.storyboard for which we are going to use the time buttons for our notifications. Select each button. In the Attributes inspector, update the text inside of eachbutton ...