Reputation: 53540
I have an Action Sheet popping up and I want to pass a certain argument to a button processing method.
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?
Upvotes: 8
Views: 2936
Reputation: 285
if you want to pass an integer, use UIActionSheet.tag. if you want to pass a NSString, use UIActionSheet.accessibilityValue.
these are simple and easy. no need to create an instance variable.
Upvotes: 3
Reputation: 31303
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.
Upvotes: 3
Reputation: 58786
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.
Upvotes: 6