Hi everyone,
I have a simple question. I have created many buttons with different titles (and tags if it is useful) using addSubview:button, and addTarget-ed them all to one method. But I want to know which button exactly is sending the message. The method is like this:
-(IBAction)pressButtonid)sender{}
Am I going to get the message by [sender currentTitle] or what? It doesn't seem to be working with that method.
Thank you!
Hi everyone,
I have a simple question. I have created many buttons with different titles (and tags if it is useful) using addSubview:button, and addTarget-ed them all to one method. But I want to know which button exactly is sending the message. The method is like this:
-(IBAction)pressButtonid)sender{}
Am I going to get the message by [sender currentTitle] or what? It doesn't seem to be working with that method.
Thank you!
so just one more thing: how do I change the title of the button after addSubview? shall I remove it all then add it again? all the buttons displaying are already in one mutable array.