title: Correct method to save an Int into core data?
body: <p>I have an entity with an Int16 attribute.</p>
  
  <p><a href="https://i.stack.imgur.com/TYsoA.png" rel="noreferrer"><img src="https://i.stack.imgur.com/TYsoA.png" alt="enter image description here"></a></p>
  
  <p>I want to save <code>var userRepsCount = Int()</code> which is set by the below stepper method:</p>
  
  <pre><code>@IBAction func userRepsStepper(_ sender: UIStepper) {
      userExerciseRepsCounter.text = Int(sender.value).description
      self.userRepsCount = Int(sender.value)
  }
  </code></pre>
  
  <p>I want to add this to the attribute and am using <code>userExercise.reps = userRepsCount</code> to do so, however I get the error </p>
  
  <blockquote>
    <p>Cannot assign value of type 'Int' to type 'Int16'</p>
  </blockquote>
  
  <p>I was under the impression that Int16 could store int's such as this without issue? What am I missing here? </p>