title: App crashes when I select "done" button on UIPickerView before explicitly selecting a row
body: <p>Unless I explicitly select a row, the UIPickerView crashes and I get the error</p>
  
  <blockquote>
    <p>*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'time interval must be greater than 0'</p>
  </blockquote>
  
  <p>I understand that it crashes because it's not selecting any one of the rows, and the default value for Time Interval is 0.</p>
  
  <p>So how can I get the <code>PickerView</code> to select the first row without me having to explicitly select it myself?</p>
  
  <p>Here is the relevant code:</p>
  
  <pre><code>var timerDisplayed = 0
  
  
  func pickerView(_ pickerView: UIPickerView, didSelectRow row: Int, inComponent component: Int) {
              timerDisplayed = Int(timeSelect[row])!
  
          }
  
   @objc func timeClock(){
  
          UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound]) { (didAllow, error) in }
          let content = UNMutableNotificationContent()
          content.title = "Time is up!"
          content.badge = 1
          content.sound = UNNotificationSound.init(named: UNNotificationSoundName(rawValue: "note1.wav"))
  
          let trigger = UNTimeIntervalNotificationTrigger(timeInterval: TimeInterval(timerDisplayed), repeats: false)
  
          let request = UNNotificationRequest(identifier: "timerDone", content: content, trigger: trigger)
          UNUserNotificationCenter.current().add(request, withCompletionHandler: nil)
  
  
          self.timerTextField.text = ("  \(String(self.timerDisplayed))")
          dismissKeyboard()
          DispatchQueue.main.async {
              self.timer = Timer.scheduledTimer(timeInterval: 1, target: self, selector: #selector(self.Action), userInfo: nil, repeats: true)
          }
      }
  
      @objc func Action(){
          if timerDisplayed != 0 {
              DispatchQueue.main.async {
                  self.timerDisplayed -= 1
                  self.timerTextField.text = ("  \(String(self.timerDisplayed))")
              }
          }
          else {
              self.timer.invalidate()
              self.timerTextField.text = nil
              self.timerTextField.placeholder = "   Timer"
          }
      }
  </code></pre>