I would like get the integer from the name of a UIButton.
The UIButton’s name is “Button11”, and I would like my integer therefore like to be 11.
Can anybody please tell me how to do that?
I “already” have the following code:
-(IBAction)processButtonUpInside:(id)sender
{
UIButton *nButton (UIButton*)sender;
integer_t nInt = ... //I am not perfectly sure if I should use "integer_t"
}
Thank you very much!
It is better to use tag instead of name for your need.
But, if you still need the integer in name, then set the button name like this:@”13button”
Now you can get the integer like this.
EDIT:
Button name is @”Button13″.