In my class I need to have 2 different (or more) actionsheets. All of the sheets go to willPresentActionSheet. In willPresentActionSheet I do things like add a datepicker. But how do I know which actionsheet called the willPresentActionSheet?
EDIT: I created the actionsheet like this:
UIActionSheet *asheet = [[UIActionSheet alloc]
initWithTitle:@"Pick a value"
delegate:self
cancelButtonTitle:@"Cancel"
destructiveButtonTitle:nil
otherButtonTitles:@"Select"
, nil];
[asheet showInView:[self.view superview]];
[asheet setFrame:CGRectMake(0, 117, 320, 383)];
[asheet release];
You can set the ‘tag’ for the action sheets, and check the tag in
willPresentActionSheet:method. Simple!Edit:
Set the tag.
And in
willPresentActionSheet:method.