0
votes

I have a view that contains 5 buttons. When each button is tapped the UIActionSheetDelegate method is called: -(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex

I have each buttons tag property set 0-4. I'm having a hard time with the delegate method finding out which button.tag was sent. Is the sender.tag information passed along to the action sheets delegate methods?

For the delegate method I use a case statement to find out which button was pressed on the action sheet and I guess I'll use an if statement to determine which sender.tag == 0 etc. I'm just a little confused at this point and need a little assistance if at all possible.

As always thanks in advance!

T

1

1 Answers

1
votes

You use the buttonIndex that is passed to actionSheet:clickedButtonAtIndex: to determine which button was pressed. The buttons are indexed starting at 0.