tags:

views:

38

answers:

1

I want to pass an object to the action sheet from the declaration of the UIActionSheet, how to do it?

-(void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger) buttonIndex{
+2  A: 
  1. Create a property in your header.
  2. Set it whenever you create your object.
  3. Then reference it in the didDismissWithButotnIndex you posted.

Easy. Peasy. Japanesy.

Sheehan Alam
Well, it does the job. Is it a good design? Or a best practice?
sza
I don't think there is any other way. You can declare the properties private so they don't get exposed to outside classes.
Sheehan Alam