So, this is pretty straight forward, but I'm not sure how to do it. To get a title from a button, you can use:
NSString *title = [sender titleForState:UIControlStateNormal];
However, is there a way to get other information from the button such as the "Label" or "hint"?
And if there isn't, I want to be able to have different actions if a different button is pressed. So, there is an "add 1" button, an "add 2" button etc, I the same "action" to do slightly different things. This is solved by an "If" statement, but I'm not sure how to do the comparison. (Assuming the button title is "WIN"):
if (title == @"WIN")
Doesn't work, so how can I do the comparison?
(I also tried:
NSString *compare = [[NSString alloc] initWithFormat:@"WIN"];
if (title == compare)
{
do something
}
)