Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I pass arguments with UIActionSheet?

I have an Action Sheet popping up and I want to pass a certain argument to a button processing method.

For example:

I have a table and I want to pass to a button processing method row number that was selected in a table.

How can I achieve this?

like image 898
Ilya Suzdalnitski Avatar asked Mar 19 '09 21:03

Ilya Suzdalnitski


2 Answers

You would have to set this in your delegate ahead of time. You can then use this value when your delegate receives the button press notification.

like image 175
Andrew Grant Avatar answered Oct 16 '22 17:10

Andrew Grant


If it is an integer argument, put it as the tag property of the action sheet. Otherwise, you can subclass the action sheet and put variables there, or use associative references.

like image 43
user102008 Avatar answered Oct 16 '22 19:10

user102008