title: How to use UIButton as Toggle Button?
body: <p>I am trying to create a toggle button for each cell in my table. When pressed, it will change the image and when pressed again it will change the image again -- Toggle. </p>
  
  <p>In the <code>UIButton</code> class I don't see a <code>selected</code> state. </p>
  
  <p>I'm looking for a way to create a toggle button with UIButton so that I can change the state on each click. </p>
  
  <p>This is how I'm doing it in <code>rubymotion</code> right now using <code>rmq</code></p>
  
  <pre><code>@fav_button.on(:touch) do |sender|
    puts "pressed fav button for id: " + data[:id] + " and name: " + data[:name]
    #how do I change the state here?
  end
  </code></pre>