How to use UIButton as Toggle Button?
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. In the UIButton class I don't see a selected state. I'm looking for a way to create a toggle button with UIButton so that I can change the state on each click. This is how I'm doing it in rubymotion right now using rmq @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 Jan Cássio You can create toggle button easily, you just need