over 8 years ago
We can show the action sheet by using following code. In the below code we displayed the action sheet on button action.
- (IBAction)actionSheetButtonAction:(id)sender { UIAlertController *obj1=[UIAlertController alertControllerWithTitle:@"Options" message:nil preferredStyle:(UIAlertControllerStyleActionSheet)]; UIAlertAction *edit=[UIAlertAction actionWithTitle:@"Edit" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { //add code you want to perform when click on Edit }]; UIAlertAction *delete=[UIAlertAction actionWithTitle:@"Delete" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) { //add code you want to perform when click on Delete }]; UIAlertAction *cancel=[UIAlertAction actionWithTitle:@"Cancel" style:UIAlertActionStyleCancel handler:^(UIAlertAction * _Nonnull action) { //add code you want to perform when click on Cancel }]; [obj1 addAction:edit]; [obj1 addAction:delete]; [obj1 addAction:cancel]; [self presentViewController:obj1 animated:YES completion:nil]; }
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)