title: UserNotification in 3 days then repeat every day/hour - iOS 10
body: <p>UILocalNotification has been depreciated so I would like to update my code to the UserNotification framework:</p>
  
  <pre><code>let alertDays = 3.0
  let alertSeconds = alertDays * 24.0 * 60.0 * 60.0
  
  let localNotification:UILocalNotification = UILocalNotification()
  
  localNotification.alertAction = "Reminder"
  localNotification.alertTitle = "Reminder Title"
  localNotification.alertBody = "Reminder Message"
  localNotification.fireDate = Foundation.Date(timeIntervalSinceNow: alertSeconds)
  localNotification.repeatInterval = .day            
  UIApplication.shared().scheduleLocalNotification(localNotification)
  </code></pre>
  
  <p>How can I set a similar daily or hourly repeat with the UserNotification framework after waiting for the initial notification?</p>
  
  <pre><code>let alertDays = 3.0
  let alertSeconds = alertDays * 24.0 * 60.0 * 60.0
  
  let content: UNMutableNotificationContent = UNMutableNotificationContent()
  
  content.title = "Reminder Title"
  content.subtitle = "Reminder Subtitle"
  content.body = "Reminder Message"
  
  let calendar = Calendar.current
  
  let alarmTime = Foundation.Date(timeIntervalSinceNow: alertSeconds)
  let alarmTimeComponents = calendar.components([.day, .hour, .minute], from: alarmTime)
  
  let trigger = UNCalendarNotificationTrigger(dateMatching: alarmTimeComponents, repeats: true)
  
  let request = UNNotificationRequest(identifier: workoutAlarmIdentifier,
                                          content: content,
                                          trigger: trigger)
  
  UNUserNotificationCenter.current().add(request)
      {
          (error) in // ...
      }
  </code></pre>