美文网首页
UI控件提示框

UI控件提示框

作者: 0bf43b438419 | 来源:发表于2019-04-02 11:49 被阅读0次

    -(void)abb{

        //UI警报控制器

        UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"标题" message:@"messagebox" preferredStyle:UIAlertControllerStyleAlert];

        UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {

        }];

        UIAlertAction *action2= [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:^(UIAlertAction *action) {

        }];

        UIAlertAction *action3= [UIAlertAction actionWithTitle:@"警告" style:UIAlertActionStyleDestructive handler:^(UIAlertAction *action) {

        }];

        //添加

        [alert addAction:action1];

        [alert addAction:action2];

        [alert addAction:action3];

        //    [alert addAction:action3];

        [self presentViewController:alert animated:YES completion:^{

        }];

    }

    相关文章

      网友评论

          本文标题:UI控件提示框

          本文链接:https://www.haomeiwen.com/subject/huiwbqtx.html