UIActonSheet Archives

How to create an Action Sheet and respond to it

This will bring up the UIActionSheet on iPhone devices from the bottom of the screen: // trigger a UIActionSheet UIActionSheet *myActionSheet; myActionSheet = [[UIActionSheet alloc]initWithTitle:@”My Title” delegate:self cancelButtonTitle:@”Cancel” destructiveButtonTitle:@”Cancel in Red” otherButtonTitles:@”Open in Safari”, nil]; myActionSheet.actionSheetStyle = UIActionSheetStyleAutomatic; [myActionSheet showInView:self.view]; You can add more buttons if you like by comma separating them. If you don’t […]