title: change button background color when clicked
body: <p>I create a button and I want to change its color when the user clicked on. I saw the option "setimagebackground... forstate...", but there is no other option for changing the background color. I have change values of y button in viewdidload and when I use "settint color:[uicolor redcolor]" nothing happened.
  How can I fix it??
  Here is my code:</p>
  
  <pre><code>    button1.layer.borderColor = [[UIColor purpleColor]CGColor];
      button1.layer.cornerRadius = 8.0f;
      button1.layer.masksToBounds = YES;
      button1.layer.borderWidth = 1.0f; 
      [button1.tintColor = [UIColor redColor]CGColor];
      [button1 setTintColor:[UIColor blueColor]];
      [button1 setTitleColor:[UIColor cyanColor] forState:UIControlStateNormal];
      [button1 setTitleColor:[UIColor redColor] forState:UIControlStateHighlighted];
      [button1 setTintColor:[UIColor redColor]];
  </code></pre>
  
  <p>thanks!</p>