I have a UIActionSheet in my app that defaults to having 4 buttons. If a user customises an image the action sheet gains an extra 5th button allowing the user to reset this image.
I'm using this delegate method to determine which action sheet button has been clicked:
-(void)actionSheet:(UIActionSheet *)actionSheet clickedButtonAtIndex:(NSInteger)buttonIndex
The problem is the cancel button is at buttonIndex 2 by default but when the 5th button is present it is at buttonIndex 3. Is there anyway from knowing the buttonIndex you can access the title/name of the action sheet button?