iPhone - how to pass an object to a button action

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-03-23T17:40:06Z Indexed on 2010/03/23 17:43 UTC
Read the original article Hit count: 523

Filed under:
|
|

I have to pass an object to an button's action... something like

[myButton addTarget:self action:@selector(sendIt:MY_OBJECT) forControlEvents:UIControlEventTouchDown];

I cannot set a variable and use that on the method because I am on a static class.

How do I do that?

thanks for any help.

© Stack Overflow or respective owner

iPhone - how to pass an object to a button action

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-03-23T17:39:54Z Indexed on 2010/03/23 17:43 UTC
Read the original article Hit count: 523

Filed under:
|
|

I have to pass an object to an button's action... something like

[myButton addTarget:self action:@selector(sendIt:MY_OBJECT) forControlEvents:UIControlEventTouchDown];

I cannot set a variable and use that on the method because I am on a static class.

How do I do that?

thanks for any help.

© Stack Overflow or respective owner

Related posts about iphone

Related posts about iphone-sdk