UIAlertController的用法

 //添加对话提示框

        UIAlertController *actionSheetController = [UIAlertController alertControllerWithTitle:@"提示" message:@"请选择”"preferredStyle:UIAlertControllerStyleAlert];

        UIAlertAction *actionCancel = [UIAlertAction actionWithTitle:@"确定"style:UIAlertActionStyleDestructive handler:^(UIAlertAction * action) {}];

        [actionSheetController addAction:actionCancel];

        [actionSheetController.view setTintColor:[UIColor redColor]];

        [self presentViewController:actionSheetController animated:YES completion:nil];

你可能感兴趣的:(UIAlertController的用法)