title: How can I remove repetitive code in swift?
body: <p>I have 2 sections and 6 lines of code that do the opposite things for an app that I have made for a project.  The code was typed as it was taught to us, but in the project review I was told to get rid of the repetitive/like code.  Can anyone help point me in the right direction with this?  Thanks</p>
  
  <pre><code> @IBAction func stopRecording(_ sender: AnyObject) {
          recordButton.isEnabled = true
          stopRecordingButton.isEnabled = false
          recordingLabel.text = "Tap to Record"
     }
  
  
   @IBAction func recordAudio(_ sender: AnyObject)
          {
              recordingLabel.text = "Recording in Progress"
              stopRecordingButton.isEnabled = true
              recordButton.isEnabled = false
        }
  </code></pre>