title: How to get the value of a UISwitch?
body: <p>I am a newbie iOS programmer and I have a problem.  </p>
  
  <p>I currently work on iOS Core Data and my problem is that I want to insert data into a boolean attribute to a database by taking the value of a <code>UISwitch</code>.  </p>
  
  <p>The problem is that i don't know what it the method i have to call (e.g .text does the same thing but for UITextField). I have done a small google search but no results. Here is some code:</p>
  
  <pre><code>[newContact setValue:howMany.text forKey:@"quantity"]; 
  [newContact setValue:important.??? forKey:@"important"]; 
  </code></pre>
  
  <p>howmany is a textfield, important is a UISwitch</p>