I'm making a custom keypad in iOS 7, and I want the buttons' background color to change upon a user's tap. However, I can't get the button to do so. In the IBAction that I'm assigning to the buttons, the code I'm using is
    if(button.highlighted==YES){
    button.backgroundColor = [UIColor blackColor]; //Change background color
    button.titleLabel.textColor = [UIColor whiteColor]; //Change text color
    }
What am I doing wrong here? Am I misusing "highlighted"? This code doesn't seem to affect the user interface at all when I run it and I'm not sure what to replace it with.
