Changing button color in cell if clicked
<p>I'm trying to create like button in <code>tableview</code> cell for my project. If like button clicked it must change tint color to red. I'm using Alamofire and if user liked it returns wich feed is liked and in cell:</p>

<pre><code>let likerHash = data[indexPath.row]["liker_hash"] as? String
if(likerHash == ""){
   cell.likeButton.tintColor = UIColor.blackColor()
}else{
   cell.likeButton.tintColor = UIColor.redColor()
}
</code></pre>

<p>will set color of buttons for feeds. But if i click one button to like if it's not liked it changes color and iwhen i scroll down and come back again button color will change again to previous. (if on loading data it is not liked it will keep color when i scroll down.) I have tride to change value of <code>liker_hash</code> but it gives me an error: <code>mutating method sent to immutable object</code>. I am tying to change value like:</p>

<pre><code>self.data[sender.tag]["liker_hash"] = ""
</code></pre>

<p>My <code>data</code> is from type <code>[NSMutableDictionary]()</code>. Any idea how can i do it in swift language?</p>