title: ios round number to int or .5
body: <p>i have a list of numbers in a big long list imported from a CSV,</p>
  
  <p>I need to consult the list after the user enters a number in a textfield,  so after the uses enters the number I need to take the number to the nearest integer or to x.5</p>
  
  <p>for example</p>
  
  <pre><code>1;
  1.5;
  2;
  </code></pre>
  
  <p>and so on</p>
  
  <p>so if the user enters 1.2, it will go to 1, and if user enters 1.45 goes to 1.5</p>
  
  <p>so that is the general rule, but for a long set of numbers,</p>
  
  <p>so how can i accomplish this?</p>
  
  <p>thanks a lot!</p>